Re: [hlcoders] Per non local player client side simulation code - where do I put it ?

2008-07-30 Thread Matt Stafford
Thats a load of crap! I've done some of my best work at 2am with a bag of
Starbursts and a bottle of coke :D

On Wed, Jul 30, 2008 at 6:29 AM, Maarten De Meyer <[EMAIL PROTECTED]>wrote:

> The first will do just fine, thanks a lot. Don't know what's worse, the
> fact that I used it before, or the fact that it was 10 lines below the
> ugly hack I did now in stead. Lack of sleep is bad for coding, loads of
> caffeine not a substitute.
>
> > UpdateClientSideAnimation or ClientThink perhaps?
> >
> > On Tue, Jul 29, 2008 at 5:41 PM, Maarten De Meyer
> > <[EMAIL PROTECTED]>wrote:
> >
> >> Hi list!
> >>
> >> Simple question really, I want to simulate a part of a certain weapon's
> >> behavior on the client, since it's visual and I don't want the visual
> >> aspects networked ( not necessary and makes things laggy ). I usually
> >> put
> >> stuff like that in ItemPostFrame, but I'm discovering that only the
> >> local
> >> player's ItemPostFrame functions are called on the client. Is this
> >> normal,
> >> and if so, is there an interface already for what I'm trying to do or do
> >> I
> >> just hook C_BasePlayer::PhysicsSimulate or something ( where the
> >> difference between local and non local players is made ) ?
> >>
> >> Thanks,
> >>
> >> Maarten
> >>
> >>
> >> ___
> >> 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
>
>


-- 
Matt Stafford (Wraiyth)
http://www.wraiyth.com
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] grenade code

2008-07-30 Thread Yorg Kuijs
Alright another question:
I started on adding a new grenade, all went well, it's in game though 
its still using the same ammo as the regular grenade, however it will 
have a unique sound replacing the regular bleeps and explosion but I 
can't find out how to change sounds of it individually.

I found the script file named weapon_sounds.txt where you can set what 
.wavs to use for certain situations such as exploding but this would 
effect all the other grenade sounds to. So my problem is finding how to 
make it so grenades can use different sounds for explosions and even the 
bleeping after its thrown.

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



Re: [hlcoders] grenade code

2008-07-30 Thread Jed
I think you'll find it's defined in the weapons script file.

i.e. weapon_mygrenade.txt

Theres a section that defines weapon sounds and these refer to sounds
defined in weapon_sounds.txt.

Hope that helps.

- Jed

2008/7/30 Yorg Kuijs <[EMAIL PROTECTED]>:
> Alright another question:
> I started on adding a new grenade, all went well, it's in game though
> its still using the same ammo as the regular grenade, however it will
> have a unique sound replacing the regular bleeps and explosion but I
> can't find out how to change sounds of it individually.
>
> I found the script file named weapon_sounds.txt where you can set what
> .wavs to use for certain situations such as exploding but this would
> effect all the other grenade sounds to. So my problem is finding how to
> make it so grenades can use different sounds for explosions and even the
> bleeping after its thrown.
>
> ___
> 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] grenade code

2008-07-30 Thread Yorg Kuijs
nah there's only a few sounds defined there
but I found what I was looking for in the code, but again if I change 
this it will count that for all the grenades so I want to make something 
like:
if weapon_frag.cpp
{
playsound1
}

if weapon_superfrag.cpp
{
playsound2
]

I have no idea how to do this though, basically I have different code 
for the weapons themselves(what you see in hand) but they all take data 
from basegrenade_shared.cpp and thats where I can also determine 
explosion sounds but I need a way to make if's for playing sound 1 for 
nade 1, sound 2 for nade 2, sound 3 for nade 3, etc etc.
I'm new to coding so I don't know how to do this, already trying some 
things but doesn't work... yet

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



Re: [hlcoders] grenade code

2008-07-30 Thread Jed
Are you saying you want a single greande to have different "modes"
(i.e. can explode in different ways) or are you actually trying to
make each grenade as a seperate weapon type?

In our mod we have several types of grenades (four in fact) and these
are all defined as different weapons derived from from a common base
class.

- Jed

2008/7/30 Yorg Kuijs <[EMAIL PROTECTED]>:
> nah there's only a few sounds defined there
> but I found what I was looking for in the code, but again if I change this
> it will count that for all the grenades so I want to make something like:
> if weapon_frag.cpp
> {
> playsound1
> }
>
> if weapon_superfrag.cpp
> {
> playsound2
> ]
>
> I have no idea how to do this though, basically I have different code for
> the weapons themselves(what you see in hand) but they all take data from
> basegrenade_shared.cpp and thats where I can also determine explosion sounds
> but I need a way to make if's for playing sound 1 for nade 1, sound 2 for
> nade 2, sound 3 for nade 3, etc etc.
> I'm new to coding so I don't know how to do this, already trying some things
> but doesn't work... yet
>

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



Re: [hlcoders] grenade code

2008-07-30 Thread Yorg Kuijs
Been messing around for about 2 hours now and I think I almost got it
currently using this code:
if ( "weapon_superfrag" )
{
EmitSound( "HolyGrenade.Explode" );
}
else if ( "weapon_frag" )
{
EmitSound( "BaseGrenade.Explode" );
}


the problem I have is though that it seems to be ignoring the if's and 
just plays both sounds as if no if was specified at all.. so it just 
plays both HolyGrenade.Explode AND BaseGrenade.Explode for both grenades 
when it explodes. Any idea why it's completely ignoring the ifs?(it 
compiles without errors so it should be accepting the ifs, cause earlier 
it wasnt now doing it like this it didn't produce errors)

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



Re: [hlcoders] grenade code

2008-07-30 Thread Jed
Thats not going to work because your not actually testing anything.

if ( "weapon_superfrag" ). if weapon_superfrag WHAT? exactly?

I can't remember the exact code off my head but you need something like:

if ( strcmp( this.weapon_name, "weapon_superfrag") != 0)
{
...
}

So you'd be comparing the name of the weapon with a given string to
see if they match and then do something. Note the above ISNT real
code, just an example.

I still think you'd be better off just overriding the function that
plays the sound in each weapons own class.

- Jed



2008/7/30 Yorg Kuijs <[EMAIL PROTECTED]>:
> Been messing around for about 2 hours now and I think I almost got it
> currently using this code:
>if ( "weapon_superfrag" )
>{
>EmitSound( "HolyGrenade.Explode" );
>}
>else if ( "weapon_frag" )
>{
>EmitSound( "BaseGrenade.Explode" );
>}
>
>
> the problem I have is though that it seems to be ignoring the if's and
> just plays both sounds as if no if was specified at all.. so it just
> plays both HolyGrenade.Explode AND BaseGrenade.Explode for both grenades
> when it explodes. Any idea why it's completely ignoring the ifs?(it
> compiles without errors so it should be accepting the ifs, cause earlier
> it wasnt now doing it like this it didn't produce errors)
>
> ___
> 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



[hlcoders] Converting lowres -> highres textures

2008-07-30 Thread Kenrick Rilee
Is there any way to batch resize textures and increase image quality? For
example, it would resize, then run some algorithms on the image to improve
image quality. If this is possible, what program/what image processing
alogrithms would you recommend?

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



Re: [hlcoders] Converting lowres -> highres textures

2008-07-30 Thread Jed
You can't add detail/quality thats not there to begin with and
determining quality is rather subjective.

About the best you could do is enlarge and apply a sharpening filter
but, frankly, it'll still look like crud.

Maybe write to the producers of CSI and ask for the software they used
that can pull a persons iris print out of a 320x240 CCTV picture?

- Jed

2008/7/30 Kenrick Rilee <[EMAIL PROTECTED]>:
> Is there any way to batch resize textures and increase image quality? For
> example, it would resize, then run some algorithms on the image to improve
> image quality. If this is possible, what program/what image processing
> alogrithms would you recommend?
>
> Kenrick Rilee
> ___
> 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] grenade code

2008-07-30 Thread Jeffrey "botman" Broome
Yorg Kuijs wrote:
> Been messing around for about 2 hours now and I think I almost got it
> currently using this code:
> if ( "weapon_superfrag" )
> {

I hope that's not the actual code, since...

if ( pointer_to_some_text_string_here )

...will always be true since the pointer will always be non-zero.

-- 
Jeffrey "botman" Broome

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



Re: [hlcoders] grenade code

2008-07-30 Thread Paul Peloski
I'd recommend you read Bjarne Stroustrup's "The C++ Programming Language" or
a similar C++ introduction if the code you have there is what you're
actually using.

While it is legal to test a string literal like you have, it doesn't make
any sense at all. A string literal will always evaluate as true, because
it's a const char* with a non-zero value, and any non-zero pointer converted
to bool is true.

Regards,

Paul

On Wed, Jul 30, 2008 at 10:40 AM, Yorg Kuijs <[EMAIL PROTECTED]> wrote:

> Been messing around for about 2 hours now and I think I almost got it
> currently using this code:
>if ( "weapon_superfrag" )
>{
>EmitSound( "HolyGrenade.Explode" );
>}
>else if ( "weapon_frag" )
>{
>EmitSound( "BaseGrenade.Explode" );
>}
>
>
> the problem I have is though that it seems to be ignoring the if's and
> just plays both sounds as if no if was specified at all.. so it just
> plays both HolyGrenade.Explode AND BaseGrenade.Explode for both grenades
> when it explodes. Any idea why it's completely ignoring the ifs?(it
> compiles without errors so it should be accepting the ifs, cause earlier
> it wasnt now doing it like this it didn't produce errors)
>
> ___
> 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] Converting lowres -> highres textures

2008-07-30 Thread Kenrick Rilee
OK, I guess I've been reading too much Michael Crichton. Anyway, how did
fake factory do their high res textures? By hand?

On Wed, Jul 30, 2008 at 10:51 AM, Jed <[EMAIL PROTECTED]> wrote:

> You can't add detail/quality thats not there to begin with and
> determining quality is rather subjective.
>
> About the best you could do is enlarge and apply a sharpening filter
> but, frankly, it'll still look like crud.
>
> Maybe write to the producers of CSI and ask for the software they used
> that can pull a persons iris print out of a 320x240 CCTV picture?
>
> - Jed
>
> 2008/7/30 Kenrick Rilee <[EMAIL PROTECTED]>:
> > Is there any way to batch resize textures and increase image quality? For
> > example, it would resize, then run some algorithms on the image to
> improve
> > image quality. If this is possible, what program/what image processing
> > alogrithms would you recommend?
> >
> > Kenrick Rilee
> > ___
> > 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] Converting lowres -> highres textures

2008-07-30 Thread Steve Henderson
If you are looking for a good batch utility I recommend ImageMagick...

http://www.imagemagick.org

Jed is right though -- you won't be able to create pixels that aren't there.
But if you can find the original source images that were used to make the vtf's
you might find that the vtf's were intentionally downsampled to begin with
but the original DPI is sufficient for what you want to do..

Steve

On Wed, Jul 30, 2008 at 11:01 AM, Kenrick Rilee <[EMAIL PROTECTED]> wrote:
> OK, I guess I've been reading too much Michael Crichton. Anyway, how did
> fake factory do their high res textures? By hand?
>
> On Wed, Jul 30, 2008 at 10:51 AM, Jed <[EMAIL PROTECTED]> wrote:
>
>> You can't add detail/quality thats not there to begin with and
>> determining quality is rather subjective.
>>
>> About the best you could do is enlarge and apply a sharpening filter
>> but, frankly, it'll still look like crud.
>>
>> Maybe write to the producers of CSI and ask for the software they used
>> that can pull a persons iris print out of a 320x240 CCTV picture?
>>
>> - Jed
>>
>> 2008/7/30 Kenrick Rilee <[EMAIL PROTECTED]>:
>> > Is there any way to batch resize textures and increase image quality? For
>> > example, it would resize, then run some algorithms on the image to
>> improve
>> > image quality. If this is possible, what program/what image processing
>> > alogrithms would you recommend?
>> >
>> > Kenrick Rilee
>> > ___
>> > 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] grenade code

2008-07-30 Thread Yorg Kuijs
Jed schreef:
> I still think you'd be better off just overriding the function that
> plays the sound in each weapons own class.
>
>   
and how do I do that? There isn't a function that plays the sound in its 
own class, the function that plays the sound is EmitSound which is 
location in a function called CBaseGrenade::Explode in 
basegrenade_shared.cppTHAT is what causes the sound to play when the 
grenade explode, if the EmitSound is moved it doesnt play the sound when 
exploding!

the BaseGrenade.Explode is what is linked to the game_sounds_weapons.txt 
in the scripts folder, in there you can choose what .wav files to play 
if I change those sounds all the grenade sounds would be that, so which 
is why I added EmitSound for HolyGrenade.Explode which has its own .wav 
and that should result in BaseGrenade having sound 1 and 
HolyGrenade/SuperFrag having sound 2.

I believe someone mentioned the weapon scripts files to but the sounds 
you can choose there aren't even played.. EVER they're Special1, Single 
and Double, Single and Double are left with null.wav which is no sound 
and special has a sound but what is Special1? the sound isnt ever played 
when using grenades and changing the sound for it doesn't do a thing 
since it's an action which is never used so the only way to do it is 
through code and the game_sounds_weapons.txt

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



Re: [hlcoders] grenade code

2008-07-30 Thread Tony "omega" Sergi
Override explode?


On Wed, Jul 30, 2008 at 12:26 PM, Yorg Kuijs <[EMAIL PROTECTED]> wrote:

> Jed schreef:
> > I still think you'd be better off just overriding the function that
> > plays the sound in each weapons own class.
> >
> >
> and how do I do that? There isn't a function that plays the sound in its
> own class, the function that plays the sound is EmitSound which is
> location in a function called CBaseGrenade::Explode in
> basegrenade_shared.cppTHAT is what causes the sound to play when the
> grenade explode, if the EmitSound is moved it doesnt play the sound when
> exploding!
>
> the BaseGrenade.Explode is what is linked to the game_sounds_weapons.txt
> in the scripts folder, in there you can choose what .wav files to play
> if I change those sounds all the grenade sounds would be that, so which
> is why I added EmitSound for HolyGrenade.Explode which has its own .wav
> and that should result in BaseGrenade having sound 1 and
> HolyGrenade/SuperFrag having sound 2.
>
> I believe someone mentioned the weapon scripts files to but the sounds
> you can choose there aren't even played.. EVER they're Special1, Single
> and Double, Single and Double are left with null.wav which is no sound
> and special has a sound but what is Special1? the sound isnt ever played
> when using grenades and changing the sound for it doesn't do a thing
> since it's an action which is never used so the only way to do it is
> through code and the game_sounds_weapons.txt
>
> ___
> 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] grenade code

2008-07-30 Thread Tony "omega" Sergi
Or make an actual function inside the base grenade class like so:
virtual void PlayExplosionSound() {};

then inside Explode()
replace the lines that play the sound with PlayExplosionSound();
and then derive it in your subclasses to actually play the sounds.



On Wed, Jul 30, 2008 at 12:33 PM, Tony omega Sergi <[EMAIL PROTECTED]>wrote:

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



Re: [hlcoders] grenade code

2008-07-30 Thread Yorg Kuijs
Tony "omega" Sergi schreef:
> and then derive it in your subclasses to actually play the sounds.
>   
think I followed most of what you said except this. What does it mean?
Also base grenade class is basegrenade_shared.cpp ? sounds like that 
wouldn't fix it?

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



Re: [hlcoders] Converting lowres -> highres textures

2008-07-30 Thread Jake Breen
Fake Factory stole half his stuff, and photoshop filtered "his" (They're 
just Valve's lol) world textures to death.

Kenrick Rilee wrote:
> OK, I guess I've been reading too much Michael Crichton. Anyway, how did
> fake factory do their high res textures? By hand?
>
> On Wed, Jul 30, 2008 at 10:51 AM, Jed <[EMAIL PROTECTED]> wrote:
>
>   
>> You can't add detail/quality thats not there to begin with and
>> determining quality is rather subjective.
>>
>> About the best you could do is enlarge and apply a sharpening filter
>> but, frankly, it'll still look like crud.
>>
>> Maybe write to the producers of CSI and ask for the software they used
>> that can pull a persons iris print out of a 320x240 CCTV picture?
>>
>> - Jed
>>
>> 2008/7/30 Kenrick Rilee <[EMAIL PROTECTED]>:
>> 
>>> Is there any way to batch resize textures and increase image quality? For
>>> example, it would resize, then run some algorithms on the image to
>>>   
>> improve
>> 
>>> image quality. If this is possible, what program/what image processing
>>> alogrithms would you recommend?
>>>
>>> Kenrick Rilee
>>> ___
>>> 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] Bizarre prediction related "framerate" issue in new SDK

2008-07-30 Thread Leon Oskam
'tis here:
http://www.mail-archive.com/hlcoders@list.valvesoftware.com/msg23814.html

   -Leon


On Tue, Jul 29, 2008 at 2:36 PM, Tobias Kammersgaard <
[EMAIL PROTECTED]> wrote:

> Is this fix available anywhere?
> (I think I recall it being mentioned here earlier!?)
>
> /ScarT
>
>
> On 29/07/2008, Tony omega Sergi <[EMAIL PROTECTED]> wrote:
> >
> > This is actually something i've fixed.
> > It has to do with the players network tables.
> >
> >
> > On Tue, Jul 22, 2008 at 2:26 PM, Tom Edwards <[EMAIL PROTECTED]
> > >wrote:
> >
> > > I get something like this effect if I turn on multi-core features that
> > > are disabled by default.
> > >
> > > Maurino Berry wrote:
> > > > Hi guys. After extracting the new OB sdk for hl2mp It felt as if I
> was
> > > > playing at something like 30fps although the net_graph said i was
> > > > getting 200.
> > > >
> > > > So after some research I realized it doesn't happen if you turn
> > > > prediction OFF (cl_predict 0)
> > > >
> > > >  Try going up to a wall with some detail on it and strafing left and
> > > > right, and then turning cl_predict to 0 and do the same thing, I
> think
> > > > you'll notice the difference. Everything else in the game happens at
> > > > the correct framerates though, including aiming around (turning) but
> > > > the actual camera position seems to update very infrequently...
> > > >
> > > > Can anyone else see if they can detect this issue?
> > > >
> > > > ___
> > > > 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
>
>
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders