Re: [hlcoders] Prevent pause during open dev console?

2010-10-04 Thread Martin Smith
Thanks for the insight guys. I ended up wrapping a CConsolePanel in another
dialog, intercepting the toggleconsole command and using that instead. Seems
to be working well, the downside being that you lose any console history
written before it's instantiated.

A few notes for anyone interested:

The engine creates a CConsolePanel (or something just like it) inside a
panel named "GameConsole", which is similar but maybe different from the
CConsoleDialog in the VGUI lib we get. The GameConsole seems to handle the
pausing behavior and can't be changed.

I tried stealing the ConsolePanel from it and setting it up with a parent I
could control using the ipanel interface. This mostly worked, except that I
couldn't get the input textbox to focus without the original GameConsole
being active. If this worked reliably, it might be the better solution,
since you retain history and don't have the (small?) overhead of an extra
console.

Of course, it would be even nicer if there was an option to change the
engine behavior in the first place :)

Thanks again for the replies.

-Martin


On Thu, Sep 30, 2010 at 8:28 PM, Tony "omega" Sergi wrote:

> So long as it's in singleplayer (maxplayers <2) whenever the console is
> visible it is forcibly paused, and there is absolutely no way around it as
> a
> mod.
> The only 2 solutions are to either a) accept that it pauses and move on or
> b) you -can- set maxplayers to 2 to make it multiplayer instead of
> singleplayer, however that will probably break the game's networking, and
> make it not smooth anymore.
>
> tough choice? :)
> -Tony
>
>
> On Fri, Oct 1, 2010 at 9:16 AM, Adam "amckern" McKern  >wrote:
>
> > You can always build your code on the multilayer code base?
> >
> > 
> > Owner Nigredo Studios http://www.nigredostudios.com
> >
> > --- On Fri, 1/10/10, James Pizzurro 
> wrote:
> >
> > From: James Pizzurro 
> > Subject: Re: [hlcoders] Prevent pause during open dev console?
> > To: "Discussion of Half-Life Programming" <
> hlcoders@list.valvesoftware.com
> > >
> > Received: Friday, 1 October, 2010, 7:10 AM
> >
> > If I remember correctly, when the game is paused, at least one of the
> > things
> > that happens is host_timescale is set to 0. I'm not sure what could be
> done
> > about this though because it is all probably handled in
> > the inaccessible parts of the engine.
> >
> > On Thu, Sep 30, 2010 at 5:04 PM, Martin Smith 
> wrote:
> >
> > > Still no luck, but thank you also for the feedback.
> > >
> > > On Thu, Sep 30, 2010 at 4:39 PM, Tom Edwards  > > >wrote:
> > >
> > > >  You can run unpause (or perhaps it's pause again, as a toggle) while
> > > > inside the console. It's probably possible to bind a key that does
> both
> > > > things at once.
> > > >
> > > >
> > > > On 30/09/2010 7:18, Martin Smith wrote:
> > > >
> > > >> Hey list,
> > > >>
> > > >> By default, when the engine receives a toggleconsole command in a
> > > >> single-player game, the game is paused until the console is closed.
> > I'd
> > > >> like
> > > >> to allow use of the dev console while a simulation continues
> running.
> > > Can
> > > >> anyone think of a way to prevent this from happening?
> > > >>
> > > >> I guess the alternative is intercepting the command, and trying to
> run
> > > the
> > > >> console dialog from the Client DLL.
> > > >>
> > > >> Thanks!
> > > >>
> > > >> Martin
> > > >> ___
> > > >> To unsubscribe, edit your list preferences, or view the list
> archives,
> > > >> please visit:
> > > >> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > > >>
> > > >>
> > > >>
> > > > ___
> > > > To unsubscribe, edit your list preferences, or view the list
> archives,
> > > > please visit:
> > > > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > > >
> > > >
> > > ___
> > > To unsubscribe, edit your list preferences, or view the list archives,
> > > please visit:
> > > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >
> > >
> > ___
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> >
> >
> >
> > ___
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
>
>
> --
> -Tony
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Prevent pause during open dev console?

2010-09-30 Thread Tony "omega" Sergi
So long as it's in singleplayer (maxplayers <2) whenever the console is
visible it is forcibly paused, and there is absolutely no way around it as a
mod.
The only 2 solutions are to either a) accept that it pauses and move on or
b) you -can- set maxplayers to 2 to make it multiplayer instead of
singleplayer, however that will probably break the game's networking, and
make it not smooth anymore.

tough choice? :)
-Tony


On Fri, Oct 1, 2010 at 9:16 AM, Adam "amckern" McKern wrote:

> You can always build your code on the multilayer code base?
>
> 
> Owner Nigredo Studios http://www.nigredostudios.com
>
> --- On Fri, 1/10/10, James Pizzurro  wrote:
>
> From: James Pizzurro 
> Subject: Re: [hlcoders] Prevent pause during open dev console?
> To: "Discussion of Half-Life Programming"  >
> Received: Friday, 1 October, 2010, 7:10 AM
>
> If I remember correctly, when the game is paused, at least one of the
> things
> that happens is host_timescale is set to 0. I'm not sure what could be done
> about this though because it is all probably handled in
> the inaccessible parts of the engine.
>
> On Thu, Sep 30, 2010 at 5:04 PM, Martin Smith  wrote:
>
> > Still no luck, but thank you also for the feedback.
> >
> > On Thu, Sep 30, 2010 at 4:39 PM, Tom Edwards  > >wrote:
> >
> > >  You can run unpause (or perhaps it's pause again, as a toggle) while
> > > inside the console. It's probably possible to bind a key that does both
> > > things at once.
> > >
> > >
> > > On 30/09/2010 7:18, Martin Smith wrote:
> > >
> > >> Hey list,
> > >>
> > >> By default, when the engine receives a toggleconsole command in a
> > >> single-player game, the game is paused until the console is closed.
> I'd
> > >> like
> > >> to allow use of the dev console while a simulation continues running.
> > Can
> > >> anyone think of a way to prevent this from happening?
> > >>
> > >> I guess the alternative is intercepting the command, and trying to run
> > the
> > >> console dialog from the Client DLL.
> > >>
> > >> Thanks!
> > >>
> > >> Martin
> > >> ___
> > >> To unsubscribe, edit your list preferences, or view the list archives,
> > >> please visit:
> > >> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >>
> > >>
> > >>
> > > ___
> > > To unsubscribe, edit your list preferences, or view the list archives,
> > > please visit:
> > > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >
> > >
> > ___
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
>
>
>
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


-- 
-Tony
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Prevent pause during open dev console?

2010-09-30 Thread Adam "amckern" McKern
You can always build your code on the multilayer code base?


Owner Nigredo Studios http://www.nigredostudios.com

--- On Fri, 1/10/10, James Pizzurro  wrote:

From: James Pizzurro 
Subject: Re: [hlcoders] Prevent pause during open dev console?
To: "Discussion of Half-Life Programming" 
Received: Friday, 1 October, 2010, 7:10 AM

If I remember correctly, when the game is paused, at least one of the things
that happens is host_timescale is set to 0. I'm not sure what could be done
about this though because it is all probably handled in
the inaccessible parts of the engine.

On Thu, Sep 30, 2010 at 5:04 PM, Martin Smith  wrote:

> Still no luck, but thank you also for the feedback.
>
> On Thu, Sep 30, 2010 at 4:39 PM, Tom Edwards  >wrote:
>
> >  You can run unpause (or perhaps it's pause again, as a toggle) while
> > inside the console. It's probably possible to bind a key that does both
> > things at once.
> >
> >
> > On 30/09/2010 7:18, Martin Smith wrote:
> >
> >> Hey list,
> >>
> >> By default, when the engine receives a toggleconsole command in a
> >> single-player game, the game is paused until the console is closed. I'd
> >> like
> >> to allow use of the dev console while a simulation continues running.
> Can
> >> anyone think of a way to prevent this from happening?
> >>
> >> I guess the alternative is intercepting the command, and trying to run
> the
> >> console dialog from the Client DLL.
> >>
> >> Thanks!
> >>
> >> Martin
> >> ___
> >> To unsubscribe, edit your list preferences, or view the list archives,
> >> please visit:
> >> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >>
> >>
> >>
> > ___
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




  
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Prevent pause during open dev console?

2010-09-30 Thread James Pizzurro
If I remember correctly, when the game is paused, at least one of the things
that happens is host_timescale is set to 0. I'm not sure what could be done
about this though because it is all probably handled in
the inaccessible parts of the engine.

On Thu, Sep 30, 2010 at 5:04 PM, Martin Smith  wrote:

> Still no luck, but thank you also for the feedback.
>
> On Thu, Sep 30, 2010 at 4:39 PM, Tom Edwards  >wrote:
>
> >  You can run unpause (or perhaps it's pause again, as a toggle) while
> > inside the console. It's probably possible to bind a key that does both
> > things at once.
> >
> >
> > On 30/09/2010 7:18, Martin Smith wrote:
> >
> >> Hey list,
> >>
> >> By default, when the engine receives a toggleconsole command in a
> >> single-player game, the game is paused until the console is closed. I'd
> >> like
> >> to allow use of the dev console while a simulation continues running.
> Can
> >> anyone think of a way to prevent this from happening?
> >>
> >> I guess the alternative is intercepting the command, and trying to run
> the
> >> console dialog from the Client DLL.
> >>
> >> Thanks!
> >>
> >> Martin
> >> ___
> >> To unsubscribe, edit your list preferences, or view the list archives,
> >> please visit:
> >> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >>
> >>
> >>
> > ___
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Prevent pause during open dev console?

2010-09-30 Thread Martin Smith
Still no luck, but thank you also for the feedback.

On Thu, Sep 30, 2010 at 4:39 PM, Tom Edwards wrote:

>  You can run unpause (or perhaps it's pause again, as a toggle) while
> inside the console. It's probably possible to bind a key that does both
> things at once.
>
>
> On 30/09/2010 7:18, Martin Smith wrote:
>
>> Hey list,
>>
>> By default, when the engine receives a toggleconsole command in a
>> single-player game, the game is paused until the console is closed. I'd
>> like
>> to allow use of the dev console while a simulation continues running. Can
>> anyone think of a way to prevent this from happening?
>>
>> I guess the alternative is intercepting the command, and trying to run the
>> console dialog from the Client DLL.
>>
>> Thanks!
>>
>> Martin
>> ___
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>
>>
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Prevent pause during open dev console?

2010-09-30 Thread Tom Edwards
 You can run unpause (or perhaps it's pause again, as a toggle) while 
inside the console. It's probably possible to bind a key that does both 
things at once.


On 30/09/2010 7:18, Martin Smith wrote:

Hey list,

By default, when the engine receives a toggleconsole command in a
single-player game, the game is paused until the console is closed. I'd like
to allow use of the dev console while a simulation continues running. Can
anyone think of a way to prevent this from happening?

I guess the alternative is intercepting the command, and trying to run the
console dialog from the Client DLL.

Thanks!

Martin
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Prevent pause during open dev console?

2010-09-30 Thread Martin Smith
Thanks for the response, but it doesn't seem to have any effect.

On Thu, Sep 30, 2010 at 3:39 PM, Stephen Swires wrote:

> sv_pausable 0, if the game is paused you need to type "pause" before
> running
> this command
>
> On Thu, Sep 30, 2010 at 7:18 PM, Martin Smith  wrote:
>
> > Hey list,
> >
> > By default, when the engine receives a toggleconsole command in a
> > single-player game, the game is paused until the console is closed. I'd
> > like
> > to allow use of the dev console while a simulation continues running. Can
> > anyone think of a way to prevent this from happening?
> >
> > I guess the alternative is intercepting the command, and trying to run
> the
> > console dialog from the Client DLL.
> >
> > Thanks!
> >
> > Martin
> > ___
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
>
>
> --
> - Stephen Swires
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Prevent pause during open dev console?

2010-09-30 Thread Stephen Swires
sv_pausable 0, if the game is paused you need to type "pause" before running
this command

On Thu, Sep 30, 2010 at 7:18 PM, Martin Smith  wrote:

> Hey list,
>
> By default, when the engine receives a toggleconsole command in a
> single-player game, the game is paused until the console is closed. I'd
> like
> to allow use of the dev console while a simulation continues running. Can
> anyone think of a way to prevent this from happening?
>
> I guess the alternative is intercepting the command, and trying to run the
> console dialog from the Client DLL.
>
> Thanks!
>
> Martin
> ___
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>


-- 
- Stephen Swires
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



[hlcoders] Prevent pause during open dev console?

2010-09-30 Thread Martin Smith
Hey list,

By default, when the engine receives a toggleconsole command in a
single-player game, the game is paused until the console is closed. I'd like
to allow use of the dev console while a simulation continues running. Can
anyone think of a way to prevent this from happening?

I guess the alternative is intercepting the command, and trying to run the
console dialog from the Client DLL.

Thanks!

Martin
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders