Re: [hlcoders] Player-Created Predicted Entities

2010-02-22 Thread Yahn Bernier
I think you need to override:

bool C_BaseEntity::OnPredictedEntityRemove( bool isbeingremoved, C_BaseEntity 
*predicted )

And copy the data you previously simulated from the predicted entity into the 
real server one.  Note that this can occur multiple times so it might run a few 
times as create packets arrive from the server.  Once you have the server 
entity then the predicted creation one goes away (though the server one is 
still client side predicted if that makes sense-- you just don't need both 
around any more)

Yahn

From: Michael Chang [mailto:flux.black...@gmail.com]
Sent: Saturday, February 13, 2010 9:23 PM
To: hlcoders@list.valvesoftware.com
Subject: Player-Created Predicted Entities

Hopefully this message gets to Yahn but if anyone else knows anything please 
help as well.

I'm referring specifically to this issue, in this very post circa 2004

http://www.mail-archive.com/hlcoders@list.valvesoftware.com/msg09429.html

Here's an excerpt


Predicting entity creation is something we use for TF2,
but the HL2/HL2DM/CS:S code doesn't use it yet.  Since that specific
functionality is unshipped, you may run into some issues.  You'll want
to look at predictable_entity.h and predictableid as well.
...
There isn't a good example in the current SDK for this.  :(

The usage pattern would be to create the prediction of a rocket or
grenade (so that if you are lagged it doesn't just pop into existence at
some later time like you are probably used to) and predict its
simulation forward while waiting for the server to ack the true object.
The real tricky part is that the predicted entity must be locked to the
creating player's clock for simulation (see AddToPlayerSimulationList()
in c_baseplayer.cpp.h).

If anyone starts to go down this road and runs into snags, feel free to
post questions and I'll try to respond.  At some point I'd like to ship
out a proper example which will make all of this stuff clear, or at
least write up a document.


We've run into this very snag, as well as lacking documentation or examples to 
learn from. Can we please get an example?


Here's the situation:

We have a system where when the player attacks, the player creates a predicted 
entity. This entity drives the player's animation and the attack's logic. Let's 
call this entity AttackAction.

When the player creates AttackAction, it fills in details about the player's 
input state, things like how long he's been holding the attack button, when 
he's released the attack button, etc. The AttackAction is created using the 
CreatePredictedEntityByName method.


Here's the problem:

When the server gives back the real entity and replaces the predicted entity, 
the client's copy of the entity has default values (same values as if it's just 
been initialized). The shared code that ran on the server seems not to reflect 
the changes the client had made. In fact, our network vars are reset, no state 
information is retained (or so it appears), and using IsFirstTimePredicted() to 
prevent doubling up of animations do not work.


The result:

The AttackAction seems to think it's restarted itself upon reception of the 
server's version. It restarts our player animation, causing it to repeat 
itself. The animation subsequently look like it doubles on itself.

What's the correct way of predicting entity creation? Can we get some sort of 
documentation if any is available, or examples that we can follow to see it 
working?


Thanks

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



Re: [hlcoders] Prediction table questions

2009-08-12 Thread Yahn Bernier
In table, predicted forward, rolled back
  In table and FTYPEDESC_INSENDTABLE -- controlled by server value which has 
been networked, error checked
  In table and not FTYPEDESC_INSENDTABLE -- rolled forward and back, but not 
received from server, so no error checking
  In table, but FTYPEDESC_PRIVATE -- introspectable (cl_pdump) but not rolled 
forward/back or error checked (may or may not be networked) -- not part of 
prediction really

Not in table
  Unrelated to prediction, not rolled forward back, etc. (rendering variables, 
e.g.)

All of the logic for rewind/prediction is in client .dll in prediction.cpp and 
in prediction_copy.cpp and c_baseentity.cpp, etc...

-Original Message-
From: hlcoders-boun...@list.valvesoftware.com 
[mailto:hlcoders-boun...@list.valvesoftware.com] On Behalf Of Tom Edwards
Sent: Wednesday, August 12, 2009 2:07 PM
To: hlcoders
Subject: [hlcoders] Prediction table questions

I'm unclear on what the prediction table actually achieves. Here is what 
I think might be happening:

*In table:*

* Prediction error if too far out when next update arrives
* Memorised when the prediction system rewinds, and restored afterwards

*Not in table: *

* Not checked for prediction accuracy
* Can be operated on multiple times as the prediction system rewinds
  o Test prediction-IsFirstTimePredicted() to avoid this

Is this at all accurate? Is there anything else? And:

* What does it mean to have a var that is the network table but not
  the prediction table?
* What decides which functions get rewound?



___
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] SetAbsVelocity prediction problems

2009-01-19 Thread Yahn Bernier
You need to make sure the variable someFutureTime is in the prediction data 
descs correctly (even if it's not networked) or else it's intermediate values 
won't be restored correctly by the prediction system, etc.

It's okay to do your SetAbsVelocity code in player PostThink() since that is 
called from the gamemovement code during CUserCmd processing.

Also, you should consider using SetVelocity instead of SetAbsVelocity (they're 
the same unless you are attached to something via hierarchy which isn't usually 
the case for a player).

Yahn

-Original Message-
From: hlcoders-boun...@list.valvesoftware.com 
[mailto:hlcoders-boun...@list.valvesoftware.com] On Behalf Of Michael Chang
Sent: Sunday, January 18, 2009 5:15 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] SetAbsVelocity prediction problems

Expanding on this problem... some pseudocode...

Scenario A

Player::PostThink(){
  if( player attacks )
SetAbsVelocity( moveForward )
}

Scenario B

Player::PostThink(){
  if( player attacks )
someFutureTime = gpGlobals-curtime + 0.5
  if( gpGlobals-curtime  someFutureTime )
SetAbsVelocity( moveForward)
}



The first scenario properly sets the velocity on both client and server. No
prediction error occurs.

In the second scenario, the client and server seems to be ALWAYS out of sync
no matter what. If I put a msg on the second condition right before
SetAbsVelocity, gpGlobals-curtime never matches. It seems like they need to
in order to fire the velocity together at the same time.

What do I do in this situation?

~M


On Sun, Jan 18, 2009 at 4:39 PM, Michael Chang flux.black...@gmail.comwrote:

 Hi all

 Thanks for helping me last time Jorge and Ryan. But I need more help... I
 think I've whittled down the problem to its core.

 I'm trying to do a very simple SetAbsVelocity on the player but I'm getting
 prediction problems.

 First I tried doing SetAbsVelocity on ItemPreFrame for the player with some
 high velocity forwards, whenever the player attacks.
 On the client, it seems to push the player quickly, then get corrected by
 the server.
 On the server, the velocity seems to be over-written later down the path.

 I debugged and traced through everything I can think of. The velocity is
 being set properly and not touched thereafter, but on the client is reset
 immediately on the next frame somehow.

 Then I tried doing SetAbsVelocity on ItemPostFrame which seems like the
 wrong place to put this. Whenever the player attacks, the game pushes the
 player forwards.

 With 0 ping this looks great. Everything appears to work. With net_fakelag
 200 you can clearly see the client pushing the player forwards a little
 bit... STOPPING... then when the message comes down from the server the
 client finally gets teleported to a position further ahead. This is very
 choppy, especially for our third-person game.


 How do we fix this? Are there any clues? Please help.

 ~M

___
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] Exploits in master server protocol

2008-12-30 Thread Yahn Bernier
Email them to me and I'll route to the correct person here to handle the issue:

Thanks,

Yahn

-Original Message-
From: hlcoders-boun...@list.valvesoftware.com 
[mailto:hlcoders-boun...@list.valvesoftware.com] On Behalf Of Brian Rak
Sent: Tuesday, December 30, 2008 8:38 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Exploits in master server protocol

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I've found a few problems in the master server protocol, that let me
do a few bad things.  While these are not terribly major, I cannot for
example crash the server, or execute code remotely, they do have the
potential to create some problems for dedicated server hosts.  I'm
wondering who I should be emailing about this?  Obviously, going
through steam support is not really a decent option, and I don't want
to disclose them here without at least warning Valve about them.

Any idea's who I should be emailing?  My messages to valve staff
usually seem to be ignored if I send them without warning.

Thanks,
Brian devicenull Rak
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkla9y4ACgkQdYIfzEQqW+kfSQCeKavoXIj4qjzAD954Qr6VibU0
qxgAn12429qw7VmX2+jNDxZYbgZ4C3ea
=wvai
-END PGP SIGNATURE-


___
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] Master Server Information?

2008-12-13 Thread Yahn Bernier
Your getting rejected as out of date due to the protocol # you sent not 
matching what the server was expecting:

// MASTER TO SERVER
#define M2S_REQUESTRESTART  'O' // HLMaster rejected a server's 
connection because the server needs to be updated

The final 4 bytes are your challenge # again


-Original Message-
From: hlcoders-boun...@list.valvesoftware.com 
[mailto:hlcoders-boun...@list.valvesoftware.com] On Behalf Of Brian Rak
Sent: Saturday, December 13, 2008 11:45 AM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Master Server Information?

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm writing a few scripts that will allow me to register a server with
the master servers, and I'm getting a response back from the master
servers that isn't documented anywhere.  I successfully get the
challenge, and send the actual registration message, then I get a
message back with '\x4F' followed by the challenge number.  Is this a
success notification?  Is there a failure one as well? What's the
message for that?

The format I'm following seems to match what the game servers send
exactly, yet I'm unable to find the server on the master list.  Any ideas?

Packet traces:

Starting master handshake with 69.28.140.247:27011
sent:
   71 q

got:
   FF FF FF FF 73 0A 88 4Es..N
0008   FB 69  .i

sent:  (note my hex dump isn't showing the slashes correctly, despite
0x5C being \ )
   30 0A 5C 70 72 6F 74 6F0..proto
0008   63 6F 6C 5C 37 5C 63 68col.7.ch
0010   61 6C 6C 65 6E 67 65 5Callenge.
0018   31 37 37 38 30 37 37 3317780773
0020   32 30 5C 70 6C 61 79 6520.playe
0028   72 73 5C 32 5C 6D 61 78rs.2.max
0030   5C 32 32 32 5C 62 6F 74.222.bot
0038   73 5C 31 30 5C 67 61 6Ds.10.gam
0040   65 64 69 72 5C 67 61 62edir.gab
0048   65 6E 5C 6D 61 70 5C 61en.map.a
0050   72 65 6E 61 5F 67 61 62rena_gab
0058   65 6E 5C 70 61 73 73 77en.passw
0060   6F 72 64 5C 30 5C 6F 73ord.0.os
0068   5C 6C 5C 6C 61 6E 5C 30.l.lan.0
0070   5C 72 65 67 69 6F 6E 5C.region.
0078   32 35 35 5C 74 79 70 65255.type
0080   5C 64 5C 73 65 63 75 72.d.secur
0088   65 5C 30 5C 76 65 72 73e.0.vers
0090   69 6F 6E 5C 31 2E 30 2Eion.1.0.
0098   34 2E 33 5C 70 72 6F 644.3.prod
00A0   75 63 74 5C 67 61 62 65uct.gabe
00A8   6E 0A  n.

got:
   FF FF FF FF 4F 88 4E FBO.N.
0008   69 i

Thanks,
Brian devicenull Rak
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklEENcACgkQdYIfzEQqW+nQOACgwkGeP9eL2EESNu/Y0GNsLRPD
ZYsAmgIqlqYSUN3SoXTsARgJ3BFTufg0
=AB4H
-END PGP SIGNATURE-


___
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] Amateur mod team looking for skilled Lead Programmer

2008-10-14 Thread Yahn Bernier
But we're always reading...

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matt
Hoffman
Sent: Tuesday, October 14, 2008 8:56 AM
To: Discussion of Half-Life Programming
Subject: Re: [hlcoders] Amateur mod team looking for skilled Lead
Programmer

Valve rarely posts on here thou, just Tony and I think he does that in
his
off-work time.

On Tue, Oct 14, 2008 at 8:48 AM, botman [EMAIL PROTECTED]
wrote:

 Tom Leighton wrote:
  I believe not, same goes for the source coding forum on SPUF. I tend
to
  enforce the This forum is for help unofficial rule but if people
  started making informative detailed posts about their mod and why
they
  wanted help i'm sure I wouldn't mind.
 
  Who's up for writing a rulebook for hlcoders?

 I think since this list is owned and maintained by Valve, it would be
up
 to Valve to state what the rules are.  Not us.  :)

 --
 Jeffrey botman Broome

 ___
 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] Predicted variable override

2008-09-30 Thread Yahn Bernier
Remove the value from the DEFINE_PRED_FIELD stuff

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Maarten De
Meyer
Sent: Tuesday, September 30, 2008 4:47 AM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Predicted variable override

Hi list!

I'm using a client-side concommand to directly set the value of a
variable
that's predicted. My problem is that the prediction immediately
overrides
this value. [ I've already used a recvproxy to disable network updates
to
override this value, which works decently ]. How can I either invalidate
the current prediction, or update the value the prediction uses, so that
my value is not re-overwritten (all clientside ofcourse)?

Thanks for any insight,

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



Re: [hlcoders] Character Animation Blending problem

2008-07-12 Thread Yahn Bernier
I pinged Ken and here is what he had to say:

Blending sequence B on sequence A is:

Result = A * (1.0 - blend_factor) + B * blend_factor

Each blend accumulates on the previous pose, so what they're doing is
blending two sequences on top of the root pose like this:

result = (root_pose * (1.0 - 0.5) + sequence_a * 0.5 ) * (1.0 -
0.5) + sequence_a * 0.5)

The final result will be:

result = 0.25 * root_pose + 0.75 * sequence_a 

Blending isn't the same as addition, it's an accumulation on top of the
previous operation.  There is addition, flagging an animation as a
delta animation will get that, but that'll be true addition, which
means they'd need to subtract the root_pose from each in order to made
adding make sense, which probably isn't what they want to do.

Yahn


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Maarten De
Meyer
Sent: Saturday, July 12, 2008 7:09 AM
To: Discussion of Half-Life Programming
Subject: Re: [hlcoders] Character Animation Blending problem

I've discovered this while debugging:

if you're blending between two sequences that are the exact same pose,
you
will not attain that pose unless at least one of the two blendfactors is
at one ( feel free to try that in hlmv ).

Can anyone tell me how the blending works, and if it's possible to have
it
working the way I'd expect ( e.g. 0.5 * sequence a + 0.5 * a sequence
identical to a = a. ).

Any insight in the animation blending process is appreciated.

Maarten



 The bottom one is probably at 0.6, but to eliminate all doubt:

 http://i336.photobucket.com/albums/n330/jfkeats/ol_testmap0041.jpg

 idle_, walk_ and lower_ are identical, the sum of their weights is 1,
and
 still the blend is not 'complete', there's a part of jesus in there
which
 causes the gap.

 It doesn't look like the two sliders are both on 0.5: the top one is
 further to the left than the bottom one.

 Maarten De Meyer wrote:
 Hi list!

 I'm trying to understand a blending problem. Simple question:

 http://i336.photobucket.com/albums/n330/jfkeats/problem.jpg

 In this setup, run_lower only affects the legs ( so the upper pose
is
 Jesus, weightlists are at 0 for upper body ). run_upper_minigun and
 walk_upper_minigun are both a simple, correct pose ( correct being
with
 the hand on the front handle ).

 Why is that, if they're both blended with weight 0.50, and the
 run_lower
 should have a weight of 0 for the upper body, I still have a
 gap/incorrect
 pose ( caused by some of the 'Jesus' pose still being blended in )?
If
 the
 sum of their weights is 1.0, shouldn't the pose be exact? Ingame
this
 translates in glitches when we start/stop running, other than that
it's
 fine.

 Thanks for any insight,

 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






___
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] Replacing a single scripted sound with a randomscripted sound

2008-07-10 Thread Yahn Bernier
The server determines which of the actual .wavs from the soundscript to
play, so client side changes will be ignored.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick
Sent: Thursday, July 10, 2008 8:37 AM
To: Discussion of Half-Life Programming
Subject: Re: [hlcoders] Replacing a single scripted sound with a
randomscripted sound

I want to know this, but just in general. Can a sound script be
configured to use a random sound??

On Wed, Jul 9, 2008 at 5:11 PM, Tom Edwards [EMAIL PROTECTED]
wrote:
 I've spent a happy evening dubbing 80s pop epics and glam rock over
 TF2's ubercharge sound, and it works perfectly when I use
playgamesound.
 But when I connect to a server, even if sv_pure = 0 the stock sound
 plays. I have a horrible feeling it's because the path of the actual
 sound file is passed to the client instead of the soundscript entry.

 Here's what's on my client:

 TFPlayer.InvulnerableOn
 {
channelCHAN_STATIC
volume1
soundlevel  SNDLVL_120dB
rndwave
{
waveplayer/invulnerable_on_crimsontide.wav
waveplayer/invulnerable_on_darkness.wav
waveplayer/invulnerable_on_flashdance.wav
waveplayer/invulnerable_on_heart.wav
waveplayer/invulnerable_on_italianjob.wav
waveplayer/invulnerable_on_katebush.wav
waveplayer/invulnerable_on_marvingaye.wav
waveplayer/invulnerable_on_nightwish.wav
waveplayer/invulnerable_on_pirates.wav
waveplayer/invulnerable_on_queen.wav
waveplayer/invulnerable_on_strawbs.wav
}
 }

 Here's what's on all servers not started by me:

 TFPlayer.InvulnerableOn
 {
channelCHAN_STATIC
volume1
soundlevel  SNDLVL_120dB
waveplayer/invulnerable_on.wav
 }

 I'm not actually overwriting invulnerable_on.wav, so I can only
conclude
 that the soundscript is being bypassed.

 Not only is this very irritating, but it must be a real waste of
 bandwidth to network a string for every damn server-side sound
(consider
 vo\heavy_thanksfortheteleporter01.wav, 37 ASCII characters for that!).
 Is there any way around it? Perhaps it's a good area to look at
 optimising traffic in?


 ___
 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] Replacing a single scripted sound with arandomscripted sound

2008-07-10 Thread Yahn Bernier
Not sure if I fully understand exactly what you are trying to do, but
this syntax on the server:
 TFPlayer.InvulnerableOn
 {
channelCHAN_STATIC
volume1
soundlevel  SNDLVL_120dB
rndwave
{
waveplayer/invulnerable_on_crimsontide.wav
waveplayer/invulnerable_on_darkness.wav
waveplayer/invulnerable_on_flashdance.wav
waveplayer/invulnerable_on_heart.wav
waveplayer/invulnerable_on_italianjob.wav
waveplayer/invulnerable_on_katebush.wav
waveplayer/invulnerable_on_marvingaye.wav
waveplayer/invulnerable_on_nightwish.wav
waveplayer/invulnerable_on_pirates.wav
waveplayer/invulnerable_on_queen.wav
waveplayer/invulnerable_on_strawbs.wav
}
 }

Will make the server choose one of the wavs at random any time the
TFPlayer.InvulnerableOn script sound is emitted.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick
Sent: Thursday, July 10, 2008 9:05 AM
To: Discussion of Half-Life Programming
Subject: Re: [hlcoders] Replacing a single scripted sound with
arandomscripted sound

Can a server be configured to do a random wav by only using a script?

On Thu, Jul 10, 2008 at 10:48 AM, Yahn Bernier
[EMAIL PROTECTED] wrote:
 The server determines which of the actual .wavs from the soundscript
to
 play, so client side changes will be ignored.

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Nick
 Sent: Thursday, July 10, 2008 8:37 AM
 To: Discussion of Half-Life Programming
 Subject: Re: [hlcoders] Replacing a single scripted sound with a
 randomscripted sound

 I want to know this, but just in general. Can a sound script be
 configured to use a random sound??

 On Wed, Jul 9, 2008 at 5:11 PM, Tom Edwards [EMAIL PROTECTED]
 wrote:
 I've spent a happy evening dubbing 80s pop epics and glam rock over
 TF2's ubercharge sound, and it works perfectly when I use
 playgamesound.
 But when I connect to a server, even if sv_pure = 0 the stock sound
 plays. I have a horrible feeling it's because the path of the actual
 sound file is passed to the client instead of the soundscript entry.

 Here's what's on my client:

 TFPlayer.InvulnerableOn
 {
channelCHAN_STATIC
volume1
soundlevel  SNDLVL_120dB
rndwave
{
waveplayer/invulnerable_on_crimsontide.wav
waveplayer/invulnerable_on_darkness.wav
waveplayer/invulnerable_on_flashdance.wav
waveplayer/invulnerable_on_heart.wav
waveplayer/invulnerable_on_italianjob.wav
waveplayer/invulnerable_on_katebush.wav
waveplayer/invulnerable_on_marvingaye.wav
waveplayer/invulnerable_on_nightwish.wav
waveplayer/invulnerable_on_pirates.wav
waveplayer/invulnerable_on_queen.wav
waveplayer/invulnerable_on_strawbs.wav
}
 }

 Here's what's on all servers not started by me:

 TFPlayer.InvulnerableOn
 {
channelCHAN_STATIC
volume1
soundlevel  SNDLVL_120dB
waveplayer/invulnerable_on.wav
 }

 I'm not actually overwriting invulnerable_on.wav, so I can only
 conclude
 that the soundscript is being bypassed.

 Not only is this very irritating, but it must be a real waste of
 bandwidth to network a string for every damn server-side sound
 (consider
 vo\heavy_thanksfortheteleporter01.wav, 37 ASCII characters for
that!).
 Is there any way around it? Perhaps it's a good area to look at
 optimising traffic in?


 ___
 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] Proper way to iterate a CUtlDict?

2008-04-14 Thread Yahn Bernier
Those places are all bogus and should be considered bugs.  If nothing is
deleted from the tree then it might work in most cases, but it's the
wrong iteration pattern.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tim Baker
Sent: Monday, April 14, 2008 2:38 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Proper way to iterate a CUtlDict?

I was tracking down a crash in ai_speech.cpp
CConceptHistoriesDataOps::Save.
It looks as though m_ConceptHistories is not being iterated over
properly?

CUtlDict ConceptHistory_t, int  *ch = ...;
int count = ch-Count();
for (int i = 0; i  count; i++ ) { ... }

CUtlDict uses a CUtlRBTree for storage and that class has methods
for testing whether an index is valid or not.  Nodes in the tree aren't
stored like an array, so going from 0-count seems wrong.  The correct
way seems to be this:

for ( int i = ch-First(); i != ch-InvalidIndex(); i = ch-Next( i ) )

But there are so many places in the code that iterate over CUtlDicts
from 0-count I'm wondering what is going on here.

___
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] Proper way to iterate a CUtlDict?

2008-04-14 Thread Yahn Bernier
No, there are no remaining bugs in the code.  Well done.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick
Sent: Monday, April 14, 2008 5:04 PM
To: Discussion of Half-Life Programming
Subject: Re: [hlcoders] Proper way to iterate a CUtlDict?

LOL Is there any other bugs we should know about?

On Mon, Apr 14, 2008 at 5:31 PM, Yahn Bernier
[EMAIL PROTECTED] wrote:
 Those places are all bogus and should be considered bugs.  If nothing
is
  deleted from the tree then it might work in most cases, but it's the
  wrong iteration pattern.

  Yahn



  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Tim
Baker
  Sent: Monday, April 14, 2008 2:38 PM
  To: hlcoders@list.valvesoftware.com
  Subject: [hlcoders] Proper way to iterate a CUtlDict?

  I was tracking down a crash in ai_speech.cpp
  CConceptHistoriesDataOps::Save.
  It looks as though m_ConceptHistories is not being iterated over
  properly?

  CUtlDict ConceptHistory_t, int  *ch = ...;
  int count = ch-Count();
  for (int i = 0; i  count; i++ ) { ... }

  CUtlDict uses a CUtlRBTree for storage and that class has methods
  for testing whether an index is valid or not.  Nodes in the tree
aren't
  stored like an array, so going from 0-count seems wrong.  The
correct
  way seems to be this:

  for ( int i = ch-First(); i != ch-InvalidIndex(); i = ch-Next( i )
)

  But there are so many places in the code that iterate over CUtlDicts
  from 0-count I'm wondering what is going on here.

  ___
  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] TF2 Server Query Changes (A2S_INFO)

2008-01-29 Thread Yahn Bernier
Updated for you:

http://developer.valvesoftware.com/wiki/Server_Queries

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of LDuke
Sent: Tuesday, January 29, 2008 8:30 AM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] TF2 Server Query Changes (A2S_INFO)

--
[ Picked text/plain from multipart/alternative ]
The A2S_INFO server query on TF2 seems to have added 3 extra bytes at
the
end. I'm currently ignoring them and everything else seems to be the
same.
Can we get some info on what extra data is being returned?

Here's an example of a server response from my test server (based on
http://developer.valvesoftware.com/wiki/Server_Queries#A2S_INFO):

FF FF FF FF
49   // Type (l)
0E   //Version (14)
54 46 32 20 54 65 73 74 20 53 65 72 76 65 72 00   // Server Name (TF2
Test
Server)
63 70 5F 77 65 6C 6C 00   // Map (cp_well)
74 66 00   // Game Directory (tf)
54 65 61 6D 20 46 6F 72 74 72 65 73 73 00   // Game Description (Team
Fortress)
B8 01   // AppID (440))
00   // Number of Players (0)
18   // Maximum Players (24)
00   // Number of bots (0)
64   // Dedicated (d)
77   // OS (w)
00   // Password (0)
00   // Secure (0)
31 2E 30 2E 31 2E 37 00   // Game version (1.0.1.7)
80 87 69  // ??? WHAT IS THIS ???
--

___
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] CUtlVector*... Memory management?

2008-01-11 Thread Yahn Bernier
If the element type is a pointer:

CUtlVector CMyClass *  vecStuff;

Then the underlying object will not be destructed, just the slot holding
the ptr.

If you do:

CUtlVector CMyClass  vecStuff;

Then the object gets desctructed (but you also have to worry about
implementing a copy constructor or operator =, etc. etc.)

Safest thing in the CUtlVector CMyClass *  case is to loop through the
objects and call delete on each entry, and then call Purge/RemoveAll to
free the memory used for the raw pointers.

~CUtlVector will automatically clean up the ptrs, but if you don't
delete the objects in the CUtlVector CMyClass *  case then you'll have
a leak.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ronny
Schedel
Sent: Friday, January 11, 2008 11:50 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] CUtlVector*... Memory management?

Why you don't look at the code itself? In Remove you can see the
element
will be destroyed by the Destruct function. The Destruct function calls
the
Destructor of the element.

Best regards

Ronny Schedel


 --
 [ Picked text/plain from multipart/alternative ]
 Am I right in assuming that if you have a vector of pointers, that
point
 to
 things you create with new, you have to either call delete on each
 element
 or use PurgeAndDeleteElements()? Because that's what I've been using
up
 until recently, where it seems that trying to delete elements from a
 pointer
 vector on destruction of whatever they are members of just causes the
game
 to crash with a memory error. Removing the calls to delete stop the
crash,
 but unless CUtlVector automatically cleans up your memory for you,
won't
 this just create MASSIVE memory leaks?  As far as I knew, CUtlVector
 didn't
 magically look after your memory for you... was I wrong?

 J
 --

 ___
 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] CUtlVector*... Memory management?

2008-01-11 Thread Yahn Bernier
Well, when talking about a destructor the colloquial term is
destructed.

YMMV.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jed
Sent: Friday, January 11, 2008 1:03 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] CUtlVector*... Memory management?

[pendantic englishman]

*eye twitch* - its destroyed not destructed.

[/pendantic englishman]

On 11/01/2008, Yahn Bernier [EMAIL PROTECTED] wrote:
 If the element type is a pointer:

 CUtlVector CMyClass *  vecStuff;

 Then the underlying object will not be destructed, just the slot
holding
 the ptr.

 If you do:

 CUtlVector CMyClass  vecStuff;

 Then the object gets desctructed (but you also have to worry about
 implementing a copy constructor or operator =, etc. etc.)

 Safest thing in the CUtlVector CMyClass *  case is to loop through
the
 objects and call delete on each entry, and then call Purge/RemoveAll
to
 free the memory used for the raw pointers.

 ~CUtlVector will automatically clean up the ptrs, but if you don't
 delete the objects in the CUtlVector CMyClass *  case then you'll
have
 a leak.

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Ronny
 Schedel
 Sent: Friday, January 11, 2008 11:50 AM
 To: hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] CUtlVector*... Memory management?

 Why you don't look at the code itself? In Remove you can see the
 element
 will be destroyed by the Destruct function. The Destruct function
calls
 the
 Destructor of the element.

 Best regards

 Ronny Schedel


  --
  [ Picked text/plain from multipart/alternative ]
  Am I right in assuming that if you have a vector of pointers, that
 point
  to
  things you create with new, you have to either call delete on each
  element
  or use PurgeAndDeleteElements()? Because that's what I've been using
 up
  until recently, where it seems that trying to delete elements from a
  pointer
  vector on destruction of whatever they are members of just causes
the
 game
  to crash with a memory error. Removing the calls to delete stop the
 crash,
  but unless CUtlVector automatically cleans up your memory for you,
 won't
  this just create MASSIVE memory leaks?  As far as I knew, CUtlVector
  didn't
  magically look after your memory for you... was I wrong?
 
  J
  --
 
  ___
  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] SendProxy_String_tToString can't send wide-char string data

2007-11-20 Thread Yahn Bernier
Okay.  Maybe Mike will code up a SendPropBinaryBlob for you guys to mess
around with.  And possibly a SendPropVariableLengthBinaryBlob.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, November 20, 2007 9:33 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] SendProxy_String_tToString can't send wide-char
string data

I can see how from that perspective it would have been thought that
there'd be no need for sending wchar data across.  That's a good
explanation.

Of course in my case what I'm sending isn't really localized string
data, I just used wchar as a description because it has lots of embedded
0s in it.  As I mentioned previously, in reality it's an array of 1000+
integers.

Like I said though, it's possible to work around this limitation with
base-128 trickery, so it's not a big deal.

At 2007/11/18 07:00 PM, Yahn Bernier wrote:
Again, the sending of a binary blob is discouraged, and instead, it's
better to go with the EMBEDDED stuff and define the subfields using the
known SendProp* primitives.  In general, we don't support arbitrary
sizes for sending stuff.  You could always use a usermessage for that
if
you can't refactor it to use the existing architecture.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of OvermindDL1
Sent: Saturday, November 17, 2007 11:34 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] SendProxy_String_tToString can't send wide-char
string data

Isn't there a way to just send your own pre-built binary stream and
have it received and deserialized manually in your classes?

On 11/17/07, Yahn Bernier [EMAIL PROTECTED] wrote:
 We haven't added this to the server side since the preferred method
is
 to network the internal string (or better yet, an index, etc.) and
use
 it as a look up (vgui::localize()-Find) in the xxx_language.txt
files
 since each connected client can be using a different language.

 Yahn


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 [EMAIL PROTECTED]
 Sent: Saturday, November 17, 2007 10:41 AM
 To: hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] SendProxy_String_tToString can't send
wide-char
 string data

 Unfortunately using the array of items is not possible here.  As
noted
 on http://developer.valvesoftware.com/wiki/Networking_Entities a
single
 array of X items count X times towards the 1024 limit on the number
of
 variables associated with a single entity.  So if you wanted to send
a
 manual array string of size 1025, it won't work.

 As far as base-128 goes - if you look at the code snippet I pasted
 previously you may notice I cheated slightly because I'm sending data
in
 groups of 16bits, so I lose very few permutations.  So actually it's
not
 really base-128, but base-128 would be the simplest way to explain
it.

 Oh well, it's possible to work around in client-code, but it's
 surprising with all the internationalization garbage in the SDK that
 they don't support this.


 At 2007/11/12 05:14 PM, OvermindDL1 wrote:
 Well since no one else seemed to bother looking (and I actually got
 some time to look), the only thing the above function does is just
 fill in the passed in variant setting it as a string.  Looking at
the
 varient it supports an array of a base type (such as wchar/Int16,
like
 you would use).  Will have to do the serialization manually (but
that
 will be what... less then 10 lines of code for what you are doing,
 just put it into your own function to encapsulate it), but if the
 array in the variant works (I do not see many places it is used)
then
 it would be perfect.  Honostly though, SendProxy_String_tToString
 seems like a rather weird function to use, I only see it defined in
 one place and only used in that class's prop definition.
 
 Still that is a hack, it seems like it would be far *far* better to
 juse serialize it fully and hand it off manually (as a binary
stream,
 usual term being a binary blob) instead of using a variant, that way
 you could set up string compression, string tables, etc... etc...
for
 effective and easy network bandwidth reduction.  There would be no
 sendblob function as you just give it a char array with a length to
 let it send across the network.  Also, you should not need a
base-128
 converter, but rather a base-255 converter would be best if you
wanted
 to continue doing it your method.
 
 
 On 11/11/07, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
  Well there is no SendBlob sort of function anywhere in the dt_send
 and various other networking files.  It's not a huge deal, I just had
to
 write my own base-128 encoder, so that there wouldn't be any 0s in
the
 data that went over the wire.  It just seems that Valve would want to
 support this natively.
 
  At 2007/11/10 10:53 PM, OvermindDL1 wrote:
  Could just send it as a binary blob and not as a string (pretend
it
 is
  opaque binary

RE: [hlcoders] SendProxy_String_tToString can't send wide-char string data

2007-11-18 Thread Yahn Bernier
Again, the sending of a binary blob is discouraged, and instead, it's
better to go with the EMBEDDED stuff and define the subfields using the
known SendProp* primitives.  In general, we don't support arbitrary
sizes for sending stuff.  You could always use a usermessage for that if
you can't refactor it to use the existing architecture.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of OvermindDL1
Sent: Saturday, November 17, 2007 11:34 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] SendProxy_String_tToString can't send wide-char
string data

Isn't there a way to just send your own pre-built binary stream and
have it received and deserialized manually in your classes?

On 11/17/07, Yahn Bernier [EMAIL PROTECTED] wrote:
 We haven't added this to the server side since the preferred method is
 to network the internal string (or better yet, an index, etc.) and use
 it as a look up (vgui::localize()-Find) in the xxx_language.txt files
 since each connected client can be using a different language.

 Yahn


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 [EMAIL PROTECTED]
 Sent: Saturday, November 17, 2007 10:41 AM
 To: hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] SendProxy_String_tToString can't send
wide-char
 string data

 Unfortunately using the array of items is not possible here.  As noted
 on http://developer.valvesoftware.com/wiki/Networking_Entities a
single
 array of X items count X times towards the 1024 limit on the number of
 variables associated with a single entity.  So if you wanted to send a
 manual array string of size 1025, it won't work.

 As far as base-128 goes - if you look at the code snippet I pasted
 previously you may notice I cheated slightly because I'm sending data
in
 groups of 16bits, so I lose very few permutations.  So actually it's
not
 really base-128, but base-128 would be the simplest way to explain it.

 Oh well, it's possible to work around in client-code, but it's
 surprising with all the internationalization garbage in the SDK that
 they don't support this.


 At 2007/11/12 05:14 PM, OvermindDL1 wrote:
 Well since no one else seemed to bother looking (and I actually got
 some time to look), the only thing the above function does is just
 fill in the passed in variant setting it as a string.  Looking at the
 varient it supports an array of a base type (such as wchar/Int16,
like
 you would use).  Will have to do the serialization manually (but that
 will be what... less then 10 lines of code for what you are doing,
 just put it into your own function to encapsulate it), but if the
 array in the variant works (I do not see many places it is used) then
 it would be perfect.  Honostly though, SendProxy_String_tToString
 seems like a rather weird function to use, I only see it defined in
 one place and only used in that class's prop definition.
 
 Still that is a hack, it seems like it would be far *far* better to
 juse serialize it fully and hand it off manually (as a binary stream,
 usual term being a binary blob) instead of using a variant, that way
 you could set up string compression, string tables, etc... etc... for
 effective and easy network bandwidth reduction.  There would be no
 sendblob function as you just give it a char array with a length to
 let it send across the network.  Also, you should not need a base-128
 converter, but rather a base-255 converter would be best if you
wanted
 to continue doing it your method.
 
 
 On 11/11/07, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
  Well there is no SendBlob sort of function anywhere in the dt_send
 and various other networking files.  It's not a huge deal, I just had
to
 write my own base-128 encoder, so that there wouldn't be any 0s in the
 data that went over the wire.  It just seems that Valve would want to
 support this natively.
 
  At 2007/11/10 10:53 PM, OvermindDL1 wrote:
  Could just send it as a binary blob and not as a string (pretend
it
 is
  opaque binary data, and not a string, use binary functions, not
 string
  functions).
  
  On 11/10/07, [EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:
   Well it would be nice if there were a version of string
networking
 that was binary-safe.
  
   At 2006/09/03 08:33 PM, Aaron Schiff wrote:
   --
   [ Picked text/plain from multipart/alternative ]
   You could use a networked string table as well as the index of
 the string in
   the entity network table.  Then you can specify the string
length
 in
   AddString for the user data.
   
   On 9/3/06, [EMAIL PROTECTED]
 [EMAIL PROTECTED]
   wrote:
   
I thought there was a forum or mailing list thread on this
once
 before but
I can't find it.  Basically it seems that the close-source
side
 of the
networking does a 0x00-truncated data copy.  So you can't
send
 strings along
the wire that contain a 0x00 byte in them, such as wide-char
 strings etc.
   
Anyone know of a work-around

RE: [hlcoders] SendProxy_String_tToString can't send wide-char string data

2007-11-17 Thread Yahn Bernier
We haven't added this to the server side since the preferred method is
to network the internal string (or better yet, an index, etc.) and use
it as a look up (vgui::localize()-Find) in the xxx_language.txt files
since each connected client can be using a different language.

Yahn


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Saturday, November 17, 2007 10:41 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] SendProxy_String_tToString can't send wide-char
string data

Unfortunately using the array of items is not possible here.  As noted
on http://developer.valvesoftware.com/wiki/Networking_Entities a single
array of X items count X times towards the 1024 limit on the number of
variables associated with a single entity.  So if you wanted to send a
manual array string of size 1025, it won't work.

As far as base-128 goes - if you look at the code snippet I pasted
previously you may notice I cheated slightly because I'm sending data in
groups of 16bits, so I lose very few permutations.  So actually it's not
really base-128, but base-128 would be the simplest way to explain it.

Oh well, it's possible to work around in client-code, but it's
surprising with all the internationalization garbage in the SDK that
they don't support this.


At 2007/11/12 05:14 PM, OvermindDL1 wrote:
Well since no one else seemed to bother looking (and I actually got
some time to look), the only thing the above function does is just
fill in the passed in variant setting it as a string.  Looking at the
varient it supports an array of a base type (such as wchar/Int16, like
you would use).  Will have to do the serialization manually (but that
will be what... less then 10 lines of code for what you are doing,
just put it into your own function to encapsulate it), but if the
array in the variant works (I do not see many places it is used) then
it would be perfect.  Honostly though, SendProxy_String_tToString
seems like a rather weird function to use, I only see it defined in
one place and only used in that class's prop definition.

Still that is a hack, it seems like it would be far *far* better to
juse serialize it fully and hand it off manually (as a binary stream,
usual term being a binary blob) instead of using a variant, that way
you could set up string compression, string tables, etc... etc... for
effective and easy network bandwidth reduction.  There would be no
sendblob function as you just give it a char array with a length to
let it send across the network.  Also, you should not need a base-128
converter, but rather a base-255 converter would be best if you wanted
to continue doing it your method.


On 11/11/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Well there is no SendBlob sort of function anywhere in the dt_send
and various other networking files.  It's not a huge deal, I just had to
write my own base-128 encoder, so that there wouldn't be any 0s in the
data that went over the wire.  It just seems that Valve would want to
support this natively.

 At 2007/11/10 10:53 PM, OvermindDL1 wrote:
 Could just send it as a binary blob and not as a string (pretend it
is
 opaque binary data, and not a string, use binary functions, not
string
 functions).
 
 On 11/10/07, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
  Well it would be nice if there were a version of string networking
that was binary-safe.
 
  At 2006/09/03 08:33 PM, Aaron Schiff wrote:
  --
  [ Picked text/plain from multipart/alternative ]
  You could use a networked string table as well as the index of
the string in
  the entity network table.  Then you can specify the string length
in
  AddString for the user data.
  
  On 9/3/06, [EMAIL PROTECTED]
[EMAIL PROTECTED]
  wrote:
  
   I thought there was a forum or mailing list thread on this once
before but
   I can't find it.  Basically it seems that the close-source side
of the
   networking does a 0x00-truncated data copy.  So you can't send
strings along
   the wire that contain a 0x00 byte in them, such as wide-char
strings etc.
  
   Anyone know of a work-around?  (Short of encoding the base64ing
the
   strings or something like that.)
  
   ___
   To unsubscribe, edit your list preferences, or view the list
archives,
   please visit:
   http://list.valvesoftware.com/mailman/listinfo/hlcoders
  
  
  
  
  --
  ts2do
  --
  
  ___
  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:
 

RE: [hlcoders] Maximize view key needed for hammer.

2007-11-14 Thread Yahn Bernier
Obviously didn't hire me to do graphic design for web pages... :)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tony Paloma
Sent: Wednesday, November 14, 2007 10:37 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Maximize view key needed for hammer.

Valve hired Yahn because they thought he would fit in well.

Master to do list as of 12/12/96 (I will update this soon)

As you can see, they were right.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeffrey
botman
Broome
Sent: Monday, November 12, 2007 2:15 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Maximize view key needed for hammer.

Joel R. wrote:
 It be neat if they made Hammer open source, that way a bunch of us
 awesome and bored programmers can improve and add features, and share
 with the community.  Doesn't seem they have anyone working on Valve
 Hammer anymore, and its got a plethora of bugs.

Hmmm, maybe somebody could write their own level editor and then get a
job working at Valve...

http://ourworld.compuserve.com/homepages/bernier/

:)

--
Jeffrey botman Broome

___
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] Client side players's positions

2007-11-14 Thread Yahn Bernier
Interpolate gets called with gpGlobals-curtime, but the IInterpolatedVars each 
define their interpolation amount (see the GetInterpolationAmount code) since 
sometimes interp is just 1 tick in single player vs. cl_interp in multiplayer.

If you always want the last networked position, you can ask for 
GetNetworkOrigin, otherwise, you'll get either the last networked if you ask 
during PostDataUpdate/networking, or you'll get the interpolated position if 
you ask during rendering.

Yahn

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, November 14, 2007 10:49 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Client side players's positions

For my purposes I've used pPlayer-EyePosition() when they're walking, and
I use the vehicles' GetNetworkOrigin() when they're driving or being
driven. Not sure if this is sufficient for your purposes.

 --
 [ Picked text/plain from multipart/alternative ]
 Hi,

 I would like to know how to get where players are located client side --
 I mean from a player point of view.
 Using pPlayer-GetLocalOrigin() for non-local players will return the last
 position sent by server.
 As there is interpolation (cl_interp), locations of non-local players that
 a local player is seeing is not the one returned by
 pPlayer-GetLocalOrigin().
 I went into OnRenderStart, then in InterpolateServerentities,
 ProcessInterpolatedList, Interpolate... but I really don't understand how
 it works. For example Interpolate is called with gpGlobals-curtime which
 is surprising. I was thinking it will be gpGlobals-curtime -
 cl_interp.GetFloat().

 I spent few hours on that and the question remains the same : how can I
 get locations of non-local players client side ? I'm sure Yahn or Mike can
 answer this question.

 Thank you in advance for your help.
 _
 Votez pour vos acteurs de séries TV préférés et tentez de gagner un voyage
 à Hawaï !
 http://messengerawards.divertissements.fr.msn.com/
 --

 ___
 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] Client side players's positions

2007-11-14 Thread Yahn Bernier

You are basically correct.

As long as you ask for GetLocalOrigin/GetAbsOrigin for the non-local
players after the SimulateServerEntities does interpolation, then you'll
get back the interpolated positions.  The player will have been
interpolated already at that point.  And you are also correct that
everything on the client is in the past wrt the server, and
interpolation pushes it a slight bit further in the past to deal with
smoothing stuff out.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Janek
Sent: Wednesday, November 14, 2007 11:40 AM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Client side players's positions

Shame on me. I forgot to put a topic in my previous mail. Please do
not answer to it.

Yahn,

What I want is the exact position of players from a local client point
of view : taking care of interpolation.

I mean :
- server tickcount = 100
-- player1 is in (0, 0, 0)
-- player2 is in (100,0, 0)

- while server tickcount is 100, maybe it is only 95 for player1. If I
go to player1 client side and ask for GetLocalOrigin of all players.
Maybe I will see:
-- player1 is in (0,0,0) coz it is local player and is using prediction
-- player2 is in (50,0,0) assuming player is moving only in x axis
with 10 units/tick velocity
But in reality, player1 is not seeing player2 in (50,0,0) coz I assume
he has a cl_interp equal to 2 ticks interval. If so he is seeing
player2 in (30, 0, 0).

Am I right or not ?

If not, where am I wrong ?
If I'm right, which function can I use to have (30,0,0) as a return
value for player2 ? and when ?
Do you mean I must call GetLocalOrigin() in RenderStart to have
interpolated position ?

[EMAIL PROTECTED]


--- Message from Yahn Bernier hereafter 

Interpolate gets called with gpGlobals-curtime, but the
IInterpolatedVars =
each define their interpolation amount (see the GetInterpolationAmount
co=
de) since sometimes interp is just 1 tick in single player vs. cl_interp
in=
 multiplayer.

If you always want the last networked position, you can ask for
GetNetworkO=
rigin, otherwise, you'll get either the last networked if you ask during
Po=
stDataUpdate/networking, or you'll get the interpolated position if you
ask=
 during rendering.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
vesoftware.com] On Behalf Of [EMAIL PROTECTED]
Sent: Wednesday, November 14, 2007 10:49 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Client side players's positions

For my purposes I've used pPlayer-EyePosition() when they're walking,
and
I use the vehicles' GetNetworkOrigin() when they're driving or being
driven. Not sure if this is sufficient for your purposes.

 --
 [ Picked text/plain from multipart/alternative ]
 Hi,

 I would like to know how to get where players are located client side
--
 I mean from a player point of view.
 Using pPlayer-GetLocalOrigin() for non-local players will return the
las=
t
 position sent by server.
 As there is interpolation (cl_interp), locations of non-local players
tha=
t
 a local player is seeing is not the one returned by
 pPlayer-GetLocalOrigin().
 I went into OnRenderStart, then in InterpolateServerentities,
 ProcessInterpolatedList, Interpolate... but I really don't understand
how
 it works. For example Interpolate is called with gpGlobals-curtime
which
 is surprising. I was thinking it will be gpGlobals-curtime -
 cl_interp.GetFloat().

 I spent few hours on that and the question remains the same : how can
I
 get locations of non-local players client side ? I'm sure Yahn or Mike
ca=
n
 answer this question.

 Thank you in advance for your help.

___
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] FW: gpGlobals-curtime frozen

2007-09-28 Thread Yahn Bernier
Here's what the engine does:

//-
// SV_IsSimulating
//-
bool SV_IsSimulating( void )
{
if ( sv.IsPaused() )
return false;

#ifndef SWDS
// Don't simulate in single player if console is down or the bug UI is 
active and we're in a game
if ( !sv.IsMultiplayer() )
{
if ( g_LostVideoMemory )
return false;

// Don't simulate in single player if console is down or the 
bug UI is active and we're in a game
if ( cl.IsActive()  ( Con_IsVisible() || 
EngineVGui()-ShouldPause() ) )
return false;
}
#endif //SWDS

return true;
}


...

bool bIsSimulating = SV_IsSimulating();
bool bSendDuringPause = sv_noclipduringpause ? 
sv_noclipduringpause-GetBool() : false;


// Run any commands from client and play client Think functions if it 
is time.
sv.RunFrame(); // read network input etc

if ( SV_HasPlayers() )
{
...

SV_Think( bIsSimulating );
}
else if ( sv.IsMultiplayer() )
{
SV_Think( false );  // let the game.dll systems think
}

So unless you have players, the server doesn't advance time in multiplayer.



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Janek Le_Vert
Sent: Friday, September 28, 2007 8:41 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] FW: gpGlobals-curtime frozen

--
[ Picked text/plain from multipart/alternative ]

I'm not in singleplayer. I 'm using HL2DM base SDK (appid=320). I run a linux 
version and I discovered that gpGlobals-curtime remains the same (1.) till 
a first player joins. After that it is ok. From: [EMAIL PROTECTED] To: 
hlcoders@list.valvesoftware.com Subject: Re: [hlcoders] FW: gpGlobals-curtime 
frozen Date: Fri, 28 Sep 2007 16:37:49 +0100  If you're in singleplayer the 
game pauses when you have the console up.. could that be the problem?  
garry  On 9/28/07, Janek Le_Vert [EMAIL PROTECTED] wrote:  --  [ Picked 
text/plain from multipart/alternative ]  Hi all, I have a strange 
trouble.My mod is based on HL2DM SDK.When I start my mod, gpGlobals-curtime 
(server side) never changed : it stays to 1. all the time. When a first 
player joins, it starts counting seconds.I don't understand why. I have checked 
that engine is not paused (engine-IsPaused returns false). I have also checked 
that m_flGameStartTime is not changed and that mp_timelimit is correct and it 
is.Do you have any idea which can explain why when starting the first time 
gpGlobals-curtime never changes ? Thank you in advance for your help.  
_  Essayez 
Live.com, votre nouvelle page d'accueil ! Personnalisez-la en quelques clics 
pour retrouver tout ce qui vous intéresse au même endroit.  
http://www.live.com/getstarted  --   
___  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
_
Essayez Live.com et créez l'Internet qui vous ressemble : infos, sports, météo 
et bien plus encore !
http://www.live.com/getstarted
--

___
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] FW: gpGlobals-curtime frozen

2007-09-28 Thread Yahn Bernier
You could try comparing against gpGlobals-realtime in the mapcycle code, which 
will advance whether or not players are on the server or the game is paused or 
not.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Janek Le_Vert
Sent: Friday, September 28, 2007 9:07 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] FW: gpGlobals-curtime frozen


It sounds weird for me Yahn:
. when you start a server, you want mapcycle to be active. If curtime is 
frozen, mapcycle never continues till a players joins . when I join the server, 
curtime is ok and when I leave this server curtime is no more frozen as I can 
see maps cycling from All Seeing Eye.

PS : sorry for the text belon, but I don't understand the problem I have with 
my mail box.



 Subject: RE: [hlcoders] FW:
 gpGlobals-curtime frozen
 From:
 [EMAIL PROTECTED]
 To:
 [EMAIL PROTECTED]
 m Date: Fri, 28 Sep 2007
 08:53:44 -0700 Here's what
 the engine does:
 //
 --
 --- //
 SV_IsSimulating
 //
 --
 --- bool
 SV_IsSimulating( void ) { if
 ( sv.IsPaused() ) return
 false; #ifndef SWDS //
 Don't simulate in single
 player if console is down or
 the bug UI is active and we're
 in a game if (
 !sv.IsMultiplayer() ) { if (
 g_LostVideoMemory ) return
 false; // Don't simulate in
 single player if console is
 down or the bug UI is active
 and we're in a game if (
 cl.IsActive()  (
 Con_IsVisible() ||
 EngineVGui()-ShouldPause() )
 ) return false; } #endif
 //SWDS return true; }
 ... bool bIsSimulating =
 SV_IsSimulating(); bool
 bSendDuringPause =
 sv_noclipduringpause ?
 sv_noclipduringpause-GetBool(
 ) : false; // Run any
 commands from client and play
 client Think functions if it
 is time. sv.RunFrame(); //
 read network input etc if (
 SV_HasPlayers() ) { ...
 SV_Think( bIsSimulating ); }
 else if ( sv.IsMultiplayer()
 ) { SV_Think( false ); //
 let the game.dll systems
 think } So unless you have
 players, the server doesn't
 advance time in
 multiplayer. -Original
 Message- From:
 [EMAIL PROTECTED]
 are.com
 [mailto:[EMAIL PROTECTED]
 lvesoftware.com] On Behalf Of
 Janek Le_Vert Sent: Friday,
 September 28, 2007 8:41 AM
 To:
 [EMAIL PROTECTED]
 m Subject: RE: [hlcoders] FW:
 gpGlobals-curtime frozen
 -- 

RE: [hlcoders] FW: SDK Needs to be fixed

2007-09-25 Thread Yahn Bernier
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
There is another bug fix which will go into the Orange Box version of
the SDK related to the view models replaying part of their previous
animation.  (And there are a few other fixes which explain why
cl_showerror is overly spammy on m_nTickBase/m_vecOrigin errors for the
local player).

It's due to the interaction of the sequence blending code with the
networking and prediction systems. To fix, we had to make the following
change (new code in red) in c_baseanimating.cpp:

//--
---
// Purpose: if the active sequence changes, keep track of the previous
ones and decay them based on their decay rate
//--
---
void C_BaseAnimating::MaintainSequenceTransitions( CStudioHdr *hdr,
float flCycle, float flPoseParameter[], Vector pos[], Quaternion q[],
int boneMask )
{
VPROF( C_BaseAnimating::MaintainSequenceTransitions );

if ( !hdr )
return;

if ( prediction-InPrediction() )
{
m_nPrevNewSequenceParity = m_nNewSequenceParity;
return;
}

Give that a try and see if it fixes your issue

(You'll need to include prediction.h in the .cpp file, too)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Justin Krenz
Sent: Tuesday, September 25, 2007 5:00 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] FW: SDK Needs to be fixed

Yeah, I'm ashamed for all of us that we didn't find this sooner. :P

Tell me how this fix works for you.  It fixes the issues I was having
with glitchy shoot animations and of course the shoot animations
occurring over twice as fast for rapid fire weapons.  However, I'm still
getting a jittering in the animations when deploying the weapon and with
net_fakelag set to at least 100.  This doesn't occur in the HL2DM SDK,
and doing a cl_pdump of the predicted view model and the weapon itself
shows that everything is exactly the same.  The jittering occurs right
when the client receives the new m_nSequence at the bottom of
baseviewmodel_shared.cpp via the recvproxy.

Are you experiencing this same problem?


Tony omega Sergi wrote:
 --
 [ Picked text/plain from multipart/alternative ] Wow, great catch man.

 I didn't even notice that!
 -Tony

 On 9/25/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Great News if this is the case. :P


 --

 ___
 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] FW: SDK Needs to be fixed

2007-09-25 Thread Yahn Bernier
Well, I'm 100% sure we don't have this bug in our current codebase.  So
probably when the SDK gets imaged from it the bug will be fixed for all.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick
Sent: Tuesday, September 25, 2007 7:13 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] FW: SDK Needs to be fixed

These bugs scare me, if neither Valve nor the more experienced coders
can fix them. What hope is there for the rest of us less experienced
coders?

On 9/25/07, Justin Krenz [EMAIL PROTECTED] wrote:
 It seems that fix only comes into play when getting an attachment from

 the local weapon.  My problem is elsewhere as it happens during all
 animations.  Is anyone else experiencing my problem?  I suppose I
 should create a new base sdk mod and see if it happens there too to
 make sure it's not something I've broken, but I know it's not
 occurring in the HL2DM sdk.

 Yahn Bernier wrote:
  This is a multi-part message in MIME format.
  --
  [ Picked text/plain from multipart/alternative ] There is another
  bug fix which will go into the Orange Box version of the SDK related

  to the view models replaying part of their previous animation.
  (And there are a few other fixes which explain why cl_showerror is
  overly spammy on m_nTickBase/m_vecOrigin errors for the local
  player).
 
  It's due to the interaction of the sequence blending code with the
  networking and prediction systems. To fix, we had to make the
  following change (new code in red) in c_baseanimating.cpp:
 
  //--
  
  ---
  // Purpose: if the active sequence changes, keep track of the
  previous ones and decay them based on their decay rate
  //--
  
  ---
  void C_BaseAnimating::MaintainSequenceTransitions( CStudioHdr *hdr,
  float flCycle, float flPoseParameter[], Vector pos[], Quaternion
  q[], int boneMask ) {
VPROF( C_BaseAnimating::MaintainSequenceTransitions );
 
if ( !hdr )
return;
 
if ( prediction-InPrediction() )
{
m_nPrevNewSequenceParity = m_nNewSequenceParity;
return;
}
 
  Give that a try and see if it fixes your issue
 
  (You'll need to include prediction.h in the .cpp file, too)
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Justin
  Krenz
  Sent: Tuesday, September 25, 2007 5:00 PM
  To: hlcoders@list.valvesoftware.com
  Subject: Re: [hlcoders] FW: SDK Needs to be fixed
 
  Yeah, I'm ashamed for all of us that we didn't find this sooner. :P
 
  Tell me how this fix works for you.  It fixes the issues I was
  having with glitchy shoot animations and of course the shoot
  animations occurring over twice as fast for rapid fire weapons.
  However, I'm still getting a jittering in the animations when
  deploying the weapon and with net_fakelag set to at least 100.  This

  doesn't occur in the HL2DM SDK, and doing a cl_pdump of the
  predicted view model and the weapon itself shows that everything is
  exactly the same.  The jittering occurs right when the client
  receives the new m_nSequence at the bottom of
baseviewmodel_shared.cpp via the recvproxy.
 
  Are you experiencing this same problem?
 
 
  Tony omega Sergi wrote:
  --
  [ Picked text/plain from multipart/alternative ] Wow, great catch
man.
 
  I didn't even notice that!
  -Tony
 
  On 9/25/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
  Great News if this is the case. :P
 
 
  --
 
  ___
  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


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



RE: [hlcoders] LoopingLerp_Hermite

2007-09-14 Thread Yahn Bernier
Sorry I totally forgot about this.  I think it may be fixed in our internal 
code, as the current shipping code has this:

template 
inline float LoopingLerp_Hermite( float t, float p0, float p1, float p2 )
{
if ( fabs( p1 - p0 )  0.5f )
{
if ( p0  p1 )
p0 += 1.0f;
else
p1 += 1.0f;
}

if ( fabs( p2 - p1 )  0.5f )
{
if ( p1  p2 )
{
p1 += 1.0f;

// see if we need to fix up p0
// important for vars that are decreasing from 
p0-p1-p2 where
// p1 is fixed up relative to p2, eg p0 = 0.2, p1 = 
0.1, p2 = 0.9
if ( abs( p1 - p0 )  0.5 )
{
if ( p0  p1 )
p0 += 1.0f;
else
p1 += 1.0f;
}
}
else
{
p2 += 1.0f;
}
}

float s = Lerp_Hermite( t, p0, p1, p2 );

s = s - (int)(s);
if (s  0.0f)
{
s = s + 1.0f;
}

return s;
}

Let me know if this doesn't produce the same results as Paul's code, I suspect 
it does due to the comment dealing with decreasong p0-p2 values

Yahn

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mulchman
Sent: Friday, September 14, 2007 7:37 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] LoopingLerp_Hermite

--
[ Picked text/plain from multipart/alternative ] Back around 6/6/2006 I sent a 
proposed fixed to Yahn (pre-knowing about this
list) as our sentry gun and respawn turret guys were messed up.

It's easy to see the problem if you change the tau gun on the buggy to spin the 
opposite way.

On 9/8/07, Paul Peloski [EMAIL PROTECTED] wrote:

 --
 [ Picked text/plain from multipart/alternative ] Hey guys,

 I found a bug with LoopingLerp_Hermite (cl_dll/lerp_functions.h). Here
 is my proposed fix: http://pastebin.ca/686895

 LoopingLerp_Hermite is used to interpolate m_iv_flCycle and
 m_iv_flPoseParameter. The function is capable of looping 0..1, but
 hitches/stutters when in reverse (1..0). If you've made a wrap pose
 parameter that spins 360° in any either direction (yaw on a sentry
 gun, for
 example) then you've probably met this bug.
 http://pastebin.ca/686895

 The fix I posted above seems to solve the problem, but I have not
 tested it completely. Anybody else seen/fixed this bug and have a fix
 of their own?

 Regards,

 Paul
 --

 ___
 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] Weird request ... sound logs?

2007-08-14 Thread Yahn Bernier
voice_writevoices writes each player's voice out separately to file (I
think this cvar has shipped out, but if not, it will go out the next
time the Source engine updates on Steam).

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Spencer
'voogru' MacDonald
Sent: Tuesday, August 14, 2007 3:14 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Weird request ... sound logs?

I highly wish that server admins would get the option of recording all
voice traffic on the server with an individual file for each STEAMID.
(Probably one file for each day or so).

But, I'm just daydreaming.

Oh well.

- voogru


-Original Message-
From: Keeper [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 14, 2007 11:05 AM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Weird request ... sound logs?

We have often used chat logs to determine people that were being abusive
on our servers.  Lately we've had some problems and there is no way to
back it up because they use the microphone instead of the keyboard.

The quality doesn't have to be great, but does anyone know if it's
possible via plugin to record that sound stream to a file?  I would love
to add it to my plugin.

TIA,
Keeper



___
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] Weird request ... sound logs?

2007-08-14 Thread Yahn Bernier
You should see files based on this set of paths:

char path[ MAX_PATH ];
Q_snprintf( path, sizeof( path ), %s/voice,
g_pSoundServices-GetGameDir() );
g_pFileSystem-CreateDirHierarchy( path );

char fn[ MAX_PATH ];
Q_snprintf( fn, sizeof( fn ),
%s/pl%02d_slot%d-time%d.wav, path, index, data-m_nCount,
(int)g_pSoundServices-GetClientTime() );

WriteWaveFile( fn, (const char
*)data-m_Buffer.Base(), data-m_Buffer.TellPut(),
g_VoiceSampleFormat.wBitsPerSample, g_VoiceSampleFormat.nChannels,
Voice_SamplesPerSec() );

Msg( Writing file %s\n, fn );

Note it will write out a timestamped file each time they release the mic
button.  This only works from the client side.

Could be a bug running under Steam, so if it still fails to put files
under gamedir/voice let me know and I'll investigate at some point.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin
Ottalini
Sent: Tuesday, August 14, 2007 4:29 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Weird request ... sound logs?

I just tested this in the current beta, and although the cvar is there
and appears active, when I set it to 1 I'm not seeing any files being
created on the server (or client).



- Original Message -
From: Yahn Bernier [EMAIL PROTECTED]
To: hlcoders@list.valvesoftware.com
Sent: Tuesday, August 14, 2007 3:59 PM
Subject: RE: [hlcoders] Weird request ... sound logs?


 voice_writevoices writes each player's voice out separately to file (I

 think this cvar has shipped out, but if not, it will go out the next
 time the Source engine updates on Steam).

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Spencer
 'voogru' MacDonald
 Sent: Tuesday, August 14, 2007 3:14 PM
 To: hlcoders@list.valvesoftware.com
 Subject: RE: [hlcoders] Weird request ... sound logs?

 I highly wish that server admins would get the option of recording all

 voice traffic on the server with an individual file for each STEAMID.
 (Probably one file for each day or so).

 But, I'm just daydreaming.

 Oh well.

 - voogru


 -Original Message-
 From: Keeper [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, August 14, 2007 11:05 AM
 To: hlcoders@list.valvesoftware.com
 Subject: [hlcoders] Weird request ... sound logs?

 We have often used chat logs to determine people that were being
 abusive on our servers.  Lately we've had some problems and there is
 no way to back it up because they use the microphone instead of the
keyboard.

 The quality doesn't have to be great, but does anyone know if it's
 possible via plugin to record that sound stream to a file?  I would
 love to add it to my plugin.

 TIA,
 Keeper


___
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] VGUI : event when mouse pointer enters/exists a panel

2007-08-03 Thread Yahn Bernier
You need to subclass  Button and implement OnCursorEntered etc. there,
not in the parent Panel.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Janek
Le_Vert
Sent: Friday, August 03, 2007 10:12 AM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] VGUI : event when mouse pointer enters/exists a
panel

Hi all,

I spent hours trying to understand how I can catch a speciall event. I
hope you'll be able to help me.

I have a Panel which is including buttons (which are panels too). I want
to execute a specific function when my mouse pointer is on a button (it
is entering in the GetBounds area of this button). I don't succeed to
find how.

I have seen several virtual methods :
- OnMouseEntered
- OnMouseExited
- OnCursorMoved

I added a virtual void OnCursorEntered(); but it never goes in it.
I tried a virtual void OnCursorMoved(int x,int y); but it only send
events when in the father panel. I want to receive events from children
(the buttons). I never receive events when I 'm on a button.
I also tried MESSAGE_FUNC_INT_INT( OnCursorMoved, OnCursorMoved, x, y
); but it has the same result as using directly virtual void
OnCursorMoved(int x,int y); . It is like I don't receive any
OnCursorMoved event from children.

Do you have idea on how to do that ?

Thank you in advance for your advices.

_
Personnalisez votre Messenger avec Live.com
http://www.windowslive.fr/livecom/


___
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] VGUI : event when mouse pointer enters/exists a panel

2007-08-03 Thread Yahn Bernier
No, but you're new Button class could post one via the PostActionSignal route

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Janek Le_Vert
Sent: Friday, August 03, 2007 10:21 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] VGUI : event when mouse pointer enters/exists a panel

I thought there had a message sent via AddActionSignalTarget() but no.

OK thank you Yahn.


From: Yahn Bernier [EMAIL PROTECTED]
Reply-To: hlcoders@list.valvesoftware.com
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] VGUI : event when mouse pointer enters/exists a
panel
Date: Fri, 3 Aug 2007 10:17:11 -0700

You need to subclass  Button and implement OnCursorEntered etc. there,
not in the parent Panel.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Janek
Le_Vert
Sent: Friday, August 03, 2007 10:12 AM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] VGUI : event when mouse pointer enters/exists a
panel

Hi all,

I spent hours trying to understand how I can catch a speciall event. I
hope you'll be able to help me.

I have a Panel which is including buttons (which are panels too). I
want to execute a specific function when my mouse pointer is on a
button (it is entering in the GetBounds area of this button). I don't
succeed to find how.

I have seen several virtual methods :
- OnMouseEntered
- OnMouseExited
- OnCursorMoved

I added a virtual void OnCursorEntered(); but it never goes in it.
I tried a virtual void OnCursorMoved(int x,int y); but it only send
events when in the father panel. I want to receive events from children
(the buttons). I never receive events when I 'm on a button.
I also tried MESSAGE_FUNC_INT_INT( OnCursorMoved, OnCursorMoved, x, y
); but it has the same result as using directly virtual void
OnCursorMoved(int x,int y); . It is like I don't receive any
OnCursorMoved event from children.

Do you have idea on how to do that ?

Thank you in advance for your advices.

_
Personnalisez votre Messenger avec Live.com
http://www.windowslive.fr/livecom/


___
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


_
Windows Live Spaces : créez votre blog à votre image !
http://www.windowslive.fr/spaces


___
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] DECLARE_NETWORKCLASS DECLARE_PREDICTABLE

2007-06-20 Thread Yahn Bernier
Shouldn't have to.  If you aren't networking or predicting intermediate
state on any data specific to the derived class then all should be well.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, June 20, 2007 3:13 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] DECLARE_NETWORKCLASS  DECLARE_PREDICTABLE

Hi list,

just a quick question: if class Child derives from class Parent, and
class Parent is declared networked  predictable already with its proper
tables; and class Child does not want to add any extra networking or
prediction on top of that ( but does want to take advantage of the
networking  prediction of the parent class evidently ), is it still
necessary to implement the DECLARE_NETWORKCLASS() and
DECLARE_PREDICTABLE() macros in the Child class? What do I lose if I
don't?

Thanks for any help,

-- 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



RE: [hlcoders] Phoneme extraction

2007-06-08 Thread Yahn Bernier
We create a recognition context, then we create a grammar where the
rules are just each word in the hint text (and we do permutations where
you can skip up to a couple of words and still match as I recall).  Then
we point SAPI at the stream(.wav) and let it try and recognize the
grammar using cpRecoContext-WaitForNotifyEvent( SR_WAVTIMEOUT ) and we
look for CSpEvent(s) of type SPEI_HYPOTHESIS, SPEI_RECOGNITION, and
SPEI_FALSE_RECOGNITION and grab the reported phonemes from that.

We also have another version of the extractor .dll which uses the IMS
(formerly LipSinc) stuff.  It's much more straightforward, but requires
a separate license so we can't offer it to the SDK.

We might be able to give out the code for the SAPI version in the SDK,
I'll check around.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeffrey
botman Broome
Sent: Friday, June 08, 2007 8:30 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Phoneme extraction

Nate Nichols wrote:
 Hi,

 I was wondering if anyone knew how the automatic phoneme extraction in

 FacePoser works.  I always kind of assumed that it was an easy SAPI
 call, but after poking around through the SAPI documentation, I'm
 starting to think this is something Valve wrote themselves.

 Does anyone know what the phoneme extractor is actually doing?  I
 assume it's some kind of sliding window of recognition using the text
 you give it, but if anyone has any more specific thoughts or ideas I
 would love to hear them.

 Or, better yet, is Valve considering opening any of this code up?

My guess is that they are doing an untrained dictation mode
transcription.

You can find several examples of SAPI code on the net, for example...

http://www.ccir.ed.ac.uk/~jad/phonemes.html

--
Jeffrey botman Broome

___
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] Response System

2007-06-07 Thread Yahn Bernier
When you turn on rr_debugresponses/rr_debugrule what kind of spew do you
see when it's trying to match your context?

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matt
Stafford
Sent: Thursday, June 07, 2007 4:37 AM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Response System

--
[ Picked text/plain from multipart/alternative ] Hey all, Just wondering
if anyone else has been having issues with the NPC Response System 
rules. I've duped Alyx's code for one of our NPCs and the only response
of his that works is TLK_PLPUSH (ie saying sorry if they get in the
players way) and nothing else. I really can't track down where this is
going wrong, I've been trying but haven't gotten anywhere. Anyone else
having issues, know or a fix, or is this a known issue Valve?

Cheers

--
Matt Stafford (Wraiyth)
http://www.wraiyth.com
NightFall HL2 Mod - http://www.nightfallmod.com
--

___
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] Response System

2007-06-07 Thread Yahn Bernier
I would trace into any calls to SpeakIfAllowed and see what gives.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matt
Stafford
Sent: Thursday, June 07, 2007 9:19 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Response System

--
[ Picked text/plain from multipart/alternative ] Its not even getting
that far, the only output I get is for the TLK_IDLE and TLK_PLPUSH
concepts (which are the two that work). Nothing else (even using Alyx
with the response scripts from Episode 1) is ever getting called, even
when I'm shooting the NPC or they're taking damage from something.

On 6/8/07, Yahn Bernier [EMAIL PROTECTED] wrote:

 When you turn on rr_debugresponses/rr_debugrule what kind of spew do
 you see when it's trying to match your context?

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Matt
 Stafford
 Sent: Thursday, June 07, 2007 4:37 AM
 To: hlcoders@list.valvesoftware.com
 Subject: [hlcoders] Response System

 --
 [ Picked text/plain from multipart/alternative ] Hey all, Just
 wondering if anyone else has been having issues with the NPC Response
 System  rules. I've duped Alyx's code for one of our NPCs and the
 only response of his that works is TLK_PLPUSH (ie saying sorry if they

 get in the players way) and nothing else. I really can't track down
 where this is going wrong, I've been trying but haven't gotten
 anywhere. Anyone else having issues, know or a fix, or is this a known
issue Valve?

 Cheers

 --
 Matt Stafford (Wraiyth)
 http://www.wraiyth.com
 NightFall HL2 Mod - http://www.nightfallmod.com
 --

 ___
 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
NightFall HL2 Mod - http://www.nightfallmod.com
--

___
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] Weird .cfg goings on...

2007-04-30 Thread Yahn Bernier
Can one of you guys email me the .cfg that is borked and I'll see what
gives... Thx

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jay C.
Sent: Sunday, April 29, 2007 4:04 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Weird .cfg goings on...

Hey,

Yup I'm aware of that bug also, that was reported some time ago if my
memory serves me correct. Instead of trying to 'restrict' functionality
maybe Valve could fix some of the more long running bugs if it wasn't
too much to ask?

Thanks for your time,
- Jay


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 Sent: 29 April 2007 23:15
 To: hlcoders@list.valvesoftware.com; hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] Weird .cfg goings on...

 Unfortunately the .cfg code is closed-source so only Valve would know.

 See also http://developer.valvesoftware.com/cgi-
 bin/bugzilla/show_bug.cgi?id=64 for another .cfg bug.

 At 2007/04/29 05:51 AM, Jay C. wrote:
 Mornin all,
 
 I added a few new cvars to my plugin and duly added them to my config
 file.
 So today I noticed a weird problem, it seemed the cfg wasn't being
 executed
 when loading - as cvars were all at their default values.
 
 So I exec var/mycfg.cfg in the server console and it ouputs a huge
 string.
 
 Here's a snippet...
 
 ---
 Unknown command 10
 some_cvar1 = 0 ( def. 0.0 ) min. 0.00 max. 1.00
  - The Description.
 Unknown command 0
 some_cvar2 = 1 ( def. 1.0 ) min. 0.00 max. 1.00
  - Another description
 Unknown command 1
 some_cvar3 = 1 ( def. 1.0 ) min. 0.00 max. 4.00
  - Description numero 3.
 ...etc etc the entire contents of the config file.
 ---
 
 Now, to me this looked like a mismatched quote or something so I went

 looking through the entire thing and I found nothing, nothing at all.
 Fast forward a couple of hours and I'm still desperately searching
 for a reason, and out of desperation I look at another very large
 config
 belonging
 to someone else and notice how it doesn't use Tabs to prettify the
 cvars
 and
 their values. So I do a mass replace of Tab with Space and low and
 behold,
 the damn thing works.
 
 Now, just incase I had in-advertantly brought the file size down
 below my previous thoughts about a mysterious maximum size, I copied
 the entire contents and pasted them at the bottom of itself, and it
still worked.
 
 
 So, the point of this email I suppose is to ask why Tab causes such a

 problem in large config files? Remember, all those tabs worked fine
 up to
 a
 character limit...
 
 Thanks,
 Jason c0ldfyr3 Croghan
 
 
 ___
 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] FW: SDK Needs to be fixed

2007-04-19 Thread Yahn Bernier
I'll take a closer look at this since it's in the vanilla SDK.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Garry Newman
Sent: Thursday, April 19, 2007 7:49 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] FW: SDK Needs to be fixed

I think I might have seen this in GMod. Does it happen more when you're
jumping?



On 4/19/07, Mark Chandler [EMAIL PROTECTED] wrote:
 Here is some videos that I took over the last couple of days to show
 you the bug.

 Hidden:
 http://lodle.net/mf/ hidden.avi

 Golden Eye Dev:
 http://lodle.net/mf/ges.avi

 NimMod:
 http://lodle.net/mf/NimMod.avi

 Plan Of Attack:
 http://lodle.net/mf/planofattack.avi

 Empires:
 http://lodle.net/mf/empires.avi

 Codec is 3ivx.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 [EMAIL PROTECTED]
 Sent: Thursday, April 19, 2007 10:10 AM
 To: hlcoders@list.valvesoftware.com; hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] FW: SDK Needs to be fixed

 Why do most mods never see this issue?

 At 2007/04/12 08:43 PM, Justin Krenz wrote:
 Prediction-IsFirstTimePredicted() did not fix the problem as the
 problem is not with simulating a command multiple times.  The problem

 is with the m_flNextPrimaryAttack variable.  Take a look at this:
 
 CMD#m_flNextPrimaryAttack   gpGlobals-curtime
 CLIENT:
 8255125.99979   126.22500
 8258126.26978   126.27000
 8261126.26978   126.31499
 8264126.35978   126.36000
 SERVER:
 8255126.26978   126.31499
 8258126.35978   126.36000
 CLIENT:
 8268126.26978   126.42000
 8270126.44978   126.45000
 8275126.44978   126.52499
 8276126.53977   126.54000
 SERVER:
 8270126.44978   126.45000
 8276126.53977   126.54000
 
 This is information taken from just before PrimaryAttack() is called.
 As you can see, the extra weapon firings are from commands that are
 not being predicted multiple times.  They're from commands that only
 see the weapon as firing on the client.  What is not included here is

 information from just after PrimaryAttack() is called.  If I included

 that information, you would see that m_flNextPrimaryAttack is being
 updated to a time in the future as it should be during
 PrimaryAttack() and then has been reverted to an earlier time
 sometime inbetween the calls to PrimaryAttack.  That's the source of
 the problem and causes the client to fire the weapon multiple times.
 
 
 
 Yahn Bernier wrote:
 This might not be the best fix.  Because of the way prediction
 works, it's expected that variables from the server are set back and

 re-simulated multiple times if there's latency in the connection.
 You have to make sure that you only create effects, etc., the first
 time you predict a weapon firing on the client.  You can determine
 whether this is the first time predicted by asking
 prediction-IsFirstTimePredicted().
 
 The discrepency with ammo sounds like a bug in the mod where the
 server and the client are not simulating the exact same # of bullets

 to deduct from the clip.  There are shared random # generators and
 other means to make sure that the same CUserCmd which causes firing
 should deduct the same # of bullets on both client and server
 (SharedRandomInt, etc.)
 
 Yahn
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Mark
 Chandler
 Sent: Thursday, April 12, 2007 4:22 PM
 To: hlcoders@list.valvesoftware.com
 Subject: RE: [hlcoders] FW: SDK Needs to be fixed
 
 Not sure but only half of this worked for ge:S source. But its given

 me idea how to fix the rest so ill post up when im done.
 
 Mark [aka Lodle]
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Justin
 Krenz
 Sent: Friday, April 13, 2007 4:31 AM
 To: hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] FW: SDK Needs to be fixed
 
 I was contacted personally by the Goldeneye Source team about this
 bug, and I had fixed this already in Empires.  I assume since this
 is a bug inherent in the HL2DM sdk that everyone will want to fix
 this bug in their code.  This is the e-mail including the fix I sent
to the GE team:
 
 
 
 The bug is caused by the networked variable m_flNextPrimaryAttack
 being reset after the client has simulated firing, but the server
 has not fired the weapon yet.  The client will fire their weapon and

 increase m_flNextPrimaryAttack to a time in the future.  When the
 client receives the next server update, this variable is reset to
 the server's value of m_flNextPrimaryAttack which has not recorded
 that a shot has been fired yet.  With the value now being less than
 curtime, it's ok to fire the weapon again which is much sooner than
it should be.
 
 This bug was also related to another bug we had where our ammo

RE: [hlcoders] Sound Downloading Bug

2007-04-19 Thread Yahn Bernier
Should work for all MODs

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tony Paloma
Sent: Thursday, April 19, 2007 4:28 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Sound Downloading Bug

This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ] A while back there was
a bug where when a player downloads a sound, it can't be used until the
player restarts his or her game. This was supposedly fix, but I only see
the fix working for CSS. The bug still seems to exist in HL2:DM. Was
this a CSS only fix or was it supposed to be for both? If the fix wasn't
applied to both, will Valve please apply the fix to HL2:DM?

--


___
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] Sound Downloading Bug

2007-04-19 Thread Yahn Bernier
Certainly there could still be issues, but I reworked the startup order
of the engine to not try and load the sounds until after any downloads
had finished.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tony Paloma
Sent: Thursday, April 19, 2007 4:48 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Sound Downloading Bug

Thanks Yahn. After deleting the sounds and trying it again, it seems to
work fine now. The first time I tried it, it downloaded the sounds but
then the client console said that the file wasn't found when played. I
verified that the sounds were indeed in the steam folder. Weird that it
would occur just once. Anyways, sorry to bother.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Yahn Bernier
Sent: Thursday, April 19, 2007 4:35 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Sound Downloading Bug

Should work for all MODs

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tony Paloma
Sent: Thursday, April 19, 2007 4:28 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Sound Downloading Bug

This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ] A while back there was
a bug where when a player downloads a sound, it can't be used until the
player restarts his or her game. This was supposedly fix, but I only see
the fix working for CSS. The bug still seems to exist in HL2:DM. Was
this a CSS only fix or was it supposed to be for both? If the fix wasn't
applied to both, will Valve please apply the fix to HL2:DM?

--


___
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] Sound Downloading Bug

2007-04-19 Thread Yahn Bernier
There is probably an entry in the map's sound .cache file

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tony Paloma
Sent: Thursday, April 19, 2007 5:09 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Sound Downloading Bug

Perhaps I had the bug occur that first time because I had already
connected somewhere else prior to connecting to the server that had the
downloads. I'm not sure, it's just something to consider. However, when
I was trying to test this theory, I ran into something interesting.

After downloading the sounds, I closed HL2 and deleted them to try the
bug out again. With the files deleted, I started HL2. To make sure they
were gone, I started a listen server and typed this in the console:

] play sourceop/radio/whatislov
Failed to load sound sourceop\radio\whatislov.wav, file probably
missing from disk/repository ] play sourceop/radio/whatislove

The file whatislove.wav is deleted, and no sound was played, but there
was no error complaining about it like there was when I misspelled the
file name. This seemed strange to me for two reasons. One, the file was
deleted before HL2 was started. Two, this suggests that the game still
thinks it exists somehow.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Yahn Bernier
Sent: Thursday, April 19, 2007 4:52 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Sound Downloading Bug

Certainly there could still be issues, but I reworked the startup order
of the engine to not try and load the sounds until after any downloads
had finished.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tony Paloma
Sent: Thursday, April 19, 2007 4:48 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Sound Downloading Bug

Thanks Yahn. After deleting the sounds and trying it again, it seems to
work fine now. The first time I tried it, it downloaded the sounds but
then the client console said that the file wasn't found when played. I
verified that the sounds were indeed in the steam folder. Weird that it
would occur just once. Anyways, sorry to bother.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Yahn Bernier
Sent: Thursday, April 19, 2007 4:35 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Sound Downloading Bug

Should work for all MODs

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tony Paloma
Sent: Thursday, April 19, 2007 4:28 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Sound Downloading Bug

This is a multipart message in MIME format.
--
[ Picked text/plain from multipart/alternative ] A while back there was
a bug where when a player downloads a sound, it can't be used until the
player restarts his or her game. This was supposedly fix, but I only see
the fix working for CSS. The bug still seems to exist in HL2:DM. Was
this a CSS only fix or was it supposed to be for both? If the fix wasn't
applied to both, will Valve please apply the fix to HL2:DM?

--


___
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


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



RE: [hlcoders] FW: SDK Needs to be fixed

2007-04-18 Thread Yahn Bernier
Does this error occur from a vanilla install of the SDK code?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Justin Krenz
Sent: Thursday, April 12, 2007 6:44 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] FW: SDK Needs to be fixed

Prediction-IsFirstTimePredicted() did not fix the problem as the
problem is not with simulating a command multiple times.  The problem is
with the m_flNextPrimaryAttack variable.  Take a look at this:

CMD#m_flNextPrimaryAttack   gpGlobals-curtime
CLIENT:
8255125.99979   126.22500
8258126.26978   126.27000
8261126.26978   126.31499
8264126.35978   126.36000
SERVER:
8255126.26978   126.31499
8258126.35978   126.36000
CLIENT:
8268126.26978   126.42000
8270126.44978   126.45000
8275126.44978   126.52499
8276126.53977   126.54000
SERVER:
8270126.44978   126.45000
8276126.53977   126.54000

This is information taken from just before PrimaryAttack() is called.
As you can see, the extra weapon firings are from commands that are not
being predicted multiple times.  They're from commands that only see the
weapon as firing on the client.  What is not included here is
information from just after PrimaryAttack() is called.  If I included
that information, you would see that m_flNextPrimaryAttack is being
updated to a time in the future as it should be during PrimaryAttack()
and then has been reverted to an earlier time sometime inbetween the
calls to PrimaryAttack.  That's the source of the problem and causes the
client to fire the weapon multiple times.



Yahn Bernier wrote:
 This might not be the best fix.  Because of the way prediction works,
 it's expected that variables from the server are set back and
 re-simulated multiple times if there's latency in the connection.  You

 have to make sure that you only create effects, etc., the first time
 you predict a weapon firing on the client.  You can determine whether
 this is the first time predicted by asking
 prediction-IsFirstTimePredicted().

 The discrepency with ammo sounds like a bug in the mod where the
 server and the client are not simulating the exact same # of bullets
 to deduct from the clip.  There are shared random # generators and
 other means to make sure that the same CUserCmd which causes firing
 should deduct the same # of bullets on both client and server
 (SharedRandomInt, etc.)

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Mark
 Chandler
 Sent: Thursday, April 12, 2007 4:22 PM
 To: hlcoders@list.valvesoftware.com
 Subject: RE: [hlcoders] FW: SDK Needs to be fixed

 Not sure but only half of this worked for ge:S source. But its given
 me idea how to fix the rest so ill post up when im done.

 Mark [aka Lodle]

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Justin
 Krenz
 Sent: Friday, April 13, 2007 4:31 AM
 To: hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] FW: SDK Needs to be fixed

 I was contacted personally by the Goldeneye Source team about this
 bug, and I had fixed this already in Empires.  I assume since this is
 a bug inherent in the HL2DM sdk that everyone will want to fix this
 bug in their code.  This is the e-mail including the fix I sent to the
GE team:



 The bug is caused by the networked variable m_flNextPrimaryAttack
 being reset after the client has simulated firing, but the server has
 not fired the weapon yet.  The client will fire their weapon and
 increase m_flNextPrimaryAttack to a time in the future.  When the
 client receives the next server update, this variable is reset to the
 server's value of m_flNextPrimaryAttack which has not recorded that a
 shot has been fired yet.  With the value now being less than curtime,
 it's ok to fire the weapon again which is much sooner than it should
be.

 This bug was also related to another bug we had where our ammo counter

 would count down with each shot and then jump back up because the
 client was firing shots and the server was correcting the client on
 how many bullets had actually been fired.  This was also causing the
 client to begin reloading their weapon when it did not need reloading.

 How to fix the first bug:

 In basecombatweapon_shared.h, add the following (create a variable to
 store the last time the client fired):

 #ifdef CLIENT_DLL
 float m_flPrevPrimaryAttack;
 #endif

 In basecombatweapon_shared.cpp,
 CBaseCombatWeapon::CBaseCombatWeapon(),
 add the following (start the new variable off as 0):

 #ifdef CLIENT_DLL
 m_flPrevPrimaryAttack = 0;
 #endif


 In basecombatweapon_shared.cpp, CBaseCombatWeapon::ItemPostFrame( void

 ), find the lines that read:

 if ( ( pOwner-m_afButtonPressed  IN_ATTACK ) || (
 pOwner-m_afButtonReleased  IN_ATTACK2

RE: [hlcoders] FW: SDK Needs to be fixed

2007-04-12 Thread Yahn Bernier
This might not be the best fix.  Because of the way prediction works,
it's expected that variables from the server are set back and
re-simulated multiple times if there's latency in the connection.  You
have to make sure that you only create effects, etc., the first time you
predict a weapon firing on the client.  You can determine whether this
is the first time predicted by asking
prediction-IsFirstTimePredicted().

The discrepency with ammo sounds like a bug in the mod where the server
and the client are not simulating the exact same # of bullets to deduct
from the clip.  There are shared random # generators and other means to
make sure that the same CUserCmd which causes firing should deduct the
same # of bullets on both client and server (SharedRandomInt, etc.)

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mark
Chandler
Sent: Thursday, April 12, 2007 4:22 PM
To: [EMAIL PROTECTED]
Subject: RE: [hlcoders] FW: SDK Needs to be fixed

Not sure but only half of this worked for ge:S source. But its given me
idea how to fix the rest so ill post up when im done.

Mark [aka Lodle]

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Justin Krenz
Sent: Friday, April 13, 2007 4:31 AM
To: [EMAIL PROTECTED]
Subject: Re: [hlcoders] FW: SDK Needs to be fixed

I was contacted personally by the Goldeneye Source team about this bug,
and I had fixed this already in Empires.  I assume since this is a bug
inherent in the HL2DM sdk that everyone will want to fix this bug in
their code.  This is the e-mail including the fix I sent to the GE team:



The bug is caused by the networked variable m_flNextPrimaryAttack being
reset after the client has simulated firing, but the server has not
fired the weapon yet.  The client will fire their weapon and increase
m_flNextPrimaryAttack to a time in the future.  When the client receives
the next server update, this variable is reset to the server's value of
m_flNextPrimaryAttack which has not recorded that a shot has been fired
yet.  With the value now being less than curtime, it's ok to fire the
weapon again which is much sooner than it should be.

This bug was also related to another bug we had where our ammo counter
would count down with each shot and then jump back up because the client
was firing shots and the server was correcting the client on how many
bullets had actually been fired.  This was also causing the client to
begin reloading their weapon when it did not need reloading.

How to fix the first bug:

In basecombatweapon_shared.h, add the following (create a variable to
store the last time the client fired):

#ifdef CLIENT_DLL
float m_flPrevPrimaryAttack;
#endif

In basecombatweapon_shared.cpp, CBaseCombatWeapon::CBaseCombatWeapon(),
add the following (start the new variable off as 0):

#ifdef CLIENT_DLL
m_flPrevPrimaryAttack = 0;
#endif


In basecombatweapon_shared.cpp, CBaseCombatWeapon::ItemPostFrame( void
), find the lines that read:

if ( ( pOwner-m_afButtonPressed  IN_ATTACK ) || (
pOwner-m_afButtonReleased  IN_ATTACK2 ) )
{
  m_flNextPrimaryAttack = gpGlobals-curtime; } PrimaryAttack();


Change the PrimaryAttack(); line to the following:

#ifdef CLIENT_DLL
if (m_flPrevPrimaryAttack = gpGlobals-curtime) { #endif
  PrimaryAttack();
#ifdef CLIENT_DLL
  m_flPrevPrimaryAttack = m_flNextPrimaryAttack; } #endif


This stores the client's m_flNextPrimaryAttack variable in a separate,
non-networked variable that won't get stomped with each network
update.  We then check the m_flNextPrimaryAttack variable against the
client's m_flPrevPrimaryAttack to see if we should really be simulating
PrimaryAttack() on the client again.  If your weapons have secondary
attacks that are susceptible to the same bug, you'll have to add another
variable for the secondary attack time and check against that.

For the second bug, check your weapons' PrimaryAttack() functions and
make sure any lines that alter the weapon's m_iClip1 or m_iClip2
variable are only occurring on the server.  By default, there should be
a line that reads:

if ( iBulletsToFire  m_iClip1 )
  iBulletsToFire = m_iClip1;
m_iClip1 -= iBulletsToFire;

Surround the line that decrements m_iClip1 with #ifdef/#endif GAME_DLL:
#ifdef GAME_DLL
m_iClip1 -= iBulletsToFire;
#endif

Otherwise, the client will reach m_iClip1 == 0 sooner than the server
and begin reloading while there may be one bullet left in the gun
according to the server.  You also might see that the ammo counter is
jumping around as the client decrements bullets, and then the server
says that there are more bullets in the gun causing the counter to flash
to a higher number.



Mark Chandler wrote:
 This is a multipart message in MIME format.
 --
 [ Picked text/plain from multipart/alternative ]


 SDK Needs to be fixed

   _

 Hi,

 My name is mark and im one of the main programmers for a source mod
 called Golden Eye source (http://goldeneyesource.com). Now we have had

 

RE: [hlcoders] Exposing Interfaces

2007-04-06 Thread Yahn Bernier
You can't do this this way because in order to get at the EXPOSE'd
interface, you'd have to loadlibrary the .dll which implements it.
Since the client .dll and server .dll are already both loaded by the
engine, you'd be looking at another instance of the .dll which wouldn't
work for you.

If you are making a single player game, then you can punch a hole from
client to server by sending the interface ptr through a cvar,
usermessage, or CUserCmd data slot (since everything is in the same
process space, you can probably get away with this in single player).
It's a _huge_ hack to do this and won't work for multiplayer games or
dedicated servers for obvious reasons.

I think we might have a way for the engine to load a single shared
.dll and provide the CreateInterfaceFn factory to both the client and
game server .dlls, but that might not be in the SDK code line yet.

The preferred method would be for the client to send network messages to
your server, the server acts on those (invokes your test interface), and
responds with network messages back to the client.  It's a form of
remote procedure call.  You just have to assume arbitrary latency in
getting return values or having the messages handled.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matt Young
Sent: Thursday, April 05, 2007 10:31 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Exposing Interfaces

Hello all,

After looking at all the interface documentation, I am still stuck.
What I am trying to do is expose a custom interface located on the
server to be accessed by the client, like the IVEngineServer.  Here is
the code I am attempting to get working (I stripped it down for
readability).  This code compiles but crashes during runtime.  The
overall purpose of this is to allow communication between the client and
server, but if there is a better or more correct way of doing this,
please let me know.  Thanks a lot!

In src/gameshared, ITestInterface.h
#ifndef PB_ITEST_INTERFACE_H
#define PB_ITEST_INTERFACE_H
#include cbase.h
#define ITEST_INTERFACE_NAME TESTINTERFACE001

abstract_class ITestInterface
{
public:
  virtual bool Message(char* msg) = 0;
};
#endif

In src/dlls, TestInterface.h
#ifndef TEST_INTERFACE_H
#define TEST_INTERFACE_H
#include cbase.h
#include ITestInterface.h

class TestInterface : public ITestInterface
{
public:
  TestInterface(){};
  ~TestInterface(){};

  //ITestInterface methods
  virtual bool Message(char* msg);
};
static TestInterface* test_interface;
EXPOSE_SINGLE_INTERFACE_GLOBALVAR(TestInterface, ITestInterface,
ITEST_INTERFACE_NAME, test_interface);
bool TestInterface::Message(char* msg)
{
  Msg(The message, %s, was received\n., msg);
  return true;
}
#endif

In cdll_client_int.h, I extern the interface
extern ITestInterface *test_interface;

Then from within a class in src/cdll which should simply display the
message Yay!
test_interface-Message(Yay!);

___
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] User messages: reliable vs. unreliable

2007-03-19 Thread Yahn Bernier
Reliable data is placed into the UDP packet before unreliable data

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Peloski
Sent: Monday, March 19, 2007 7:51 AM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] User messages: reliable vs. unreliable

--
[ Picked text/plain from multipart/alternative ] Hi guys,

I would like to spawn an entity and send a user message from the
entity's Spawn function (so it the entity creation and user messages
will likely be in the same packet), on the client I'd like the client
side version of the entity to be initialized first, and then have user
message dispatched second.

If I don't call MakeReliable() on the filter, that's exactly what seems
to happen all the time. But, if I call MakeReliable(), the message seems
to be processed before the entity is initialized on the client. Any
explanation for this behavior? What exactly does a reliable filter do
differently in terms of the time the message is processed on the client?
I notice the code path coming from the engine is different (longer) when
the message is reliable, but what's happening?

I know there are other ways to do this, but, I'm just curious and would
like to save altering how my system works.

Regards,

Paul
--

___
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] User messages: reliable vs. unreliable

2007-03-19 Thread Yahn Bernier
Yeah.  Entity data is unreliable, so it goes last after any reliable
payload.  However, if you have reliable stuff queued from a previous
send, it's possible that the current reliable payload can be delayed for
several packets before being sent. So you can't rely on it being on the
client instantaneously.

I'd have to look again at the code to see if unreliable user message
precede the entity data or not, can't remember at this point.  I think
they might not.

Unreliable messages do just dissappear.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Peloski
Sent: Monday, March 19, 2007 10:30 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] User messages: reliable vs. unreliable

--
[ Picked text/plain from multipart/alternative ]
So: reliable user messages first, entity data second, unreliable user
messages last into the packet and that is how they are unpacked on the
client? Also, reliable messages are re-sent if dropped, but the
unreliable messages just disappear?

Regards,

Paul

On 3/19/07, Yahn Bernier [EMAIL PROTECTED] wrote:

 Reliable data is placed into the UDP packet before unreliable data

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Paul
 Peloski
 Sent: Monday, March 19, 2007 7:51 AM
 To: hlcoders@list.valvesoftware.com
 Subject: [hlcoders] User messages: reliable vs. unreliable

 --
 [ Picked text/plain from multipart/alternative ] Hi guys,

 I would like to spawn an entity and send a user message from the
 entity's Spawn function (so it the entity creation and user messages
 will likely be in the same packet), on the client I'd like the client
 side version of the entity to be initialized first, and then have user

 message dispatched second.

 If I don't call MakeReliable() on the filter, that's exactly what
 seems to happen all the time. But, if I call MakeReliable(), the
 message seems to be processed before the entity is initialized on the
 client. Any explanation for this behavior? What exactly does a
 reliable filter do differently in terms of the time the message is
processed on the client?
 I notice the code path coming from the engine is different (longer)
 when the message is reliable, but what's happening?

 I know there are other ways to do this, but, I'm just curious and
 would like to save altering how my system works.

 Regards,

 Paul
 --

 ___
 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] Where'd Mike Durand go?

2007-03-13 Thread Yahn Bernier
And I was in the office the week Mike and several others were on
vacation and decided to fix up a few issues you guys were seeing, but
I'm mostly moving back to other projects now that Mike is around for you
guys.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike Durand
Sent: Tuesday, March 13, 2007 12:16 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Where'd Mike Durand go?

Hi All-

I've been on vacation and then was at GDC last week so I haven't been
very active on hlcoders these days. Life is back to normal now. :)

-Mike

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tobias
Kammersgaard
Sent: Wednesday, March 07, 2007 4:59 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Where'd Mike Durand go?

--
[ Picked text/plain from multipart/alternative ] Hello there HLCoders!



I know this probably belongs in a private email to someone inside Valve,
but I'm putting on the list, since I guess somebody else must have been
wondering.



I've noticed that Yahn have started to answer most of the questions that
occur on the list, and it made me wonder the other day, that it's been
awhile since we've heard anything from Mike Durand?!



Did anything happen to him? I hope someone at Valve will answer this.
Thanks in advance.



/ProZak
--

___
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] Downloadables Bug? VALVE?

2007-03-13 Thread Yahn Bernier
Alfred and I discussed and there was too much concern that it would be
abused so we're going to leave it out for now.  I think there are other
ways for plugins to present info to clients that aren't as intrusive.

Yahn


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of LDuke
Sent: Tuesday, March 13, 2007 12:40 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Downloadables Bug? VALVE?

--
[ Picked text/plain from multipart/alternative ] The downloadables bug
fix is something a lot of plugin developers and server admins are very
happy about having. Thank you.

What about the CenterPrintText font definition is missing from
ClientScheme.res ?  Did that just not make it in, or is there some
other reason that it won't be added?

Grant
(L. Duke)



On 2/24/07, Yahn Bernier [EMAIL PROTECTED] wrote:

 Sure

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of LDuke
 Sent: Saturday, February 24, 2007 6:04 PM
 To: hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] Downloadables Bug? VALVE?

 --
 [ Picked text/plain from multipart/alternative ] Another bug that's
 been around for a while:

 The CenterPrintText font definition is missing from ClientScheme.res
 so that a HudMsg doesn't get displayed.  One of the guys at Turtlerock

 said he'd add it to the to-do list months ago. Would it be possible to

 add this fix to the next update also?

 I've been trying to show a timer in an unobtrusive place on the screen

 for a CAL match plugin for DODS, but there is really no way to do this

 right now.
 The plugin interface doesn't seem to obey the time parameter so can't
 be updated (plus it prints right on top of the flag status icons), the

 center say and hint text are too much in the way of the player's view.

 It would be an easy fix, just need to add the font definition for
 CenterPrintText to the ClientScheme.res file for CSS and DODS.

 Thanks,

 Grant
 (L. Duke)

 P.S. This is the definition I've been using to test but the players
 have to download a fixed .res file manually:

 CenterPrintText
 {
 1
 {
 nameTrebuchet MS
 tall24
 weight900
 range0x 0x007F//Basic Latin
 antialias 1
 additive1
 }
 }

 '

 On 2/24/07, Yahn Bernier [EMAIL PROTECTED] wrote:
 
  No ETA, probably in the next few weeks though.
 
  Yahn
 
 
 
 --

 ___
 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] VGUI Bug?

2007-03-12 Thread Yahn Bernier
There was a limitation in gameui.dll that restricted the model name to
32 characters.  I'll up it to 128 and that should solve this issue.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Minh
Sent: Wednesday, February 28, 2007 3:09 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] VGUI Bug?

--
[ Picked text/plain from multipart/alternative ] A quick and dirty
method would be just to rename the .vmt and it's corresponding
references. :)

So instead of
materials\VGUI\playermodels\characters\SiNTekGrunt\sintekgrunt.vmt

change it to
materials\VGUI\playermodels\characters\SiNTekGrunt\grunt.vmt

good luck, with whatever method you choose.

- Original Message -
From: Sarkie [EMAIL PROTECTED]
To: hlcoders@list.valvesoftware.com
Sent: Wednesday, February 28, 2007 2:40 PM
Subject: [hlcoders] VGUI Bug?


 --
 [ Picked text/plain from multipart/alternative ] Hi,

 I am working on the Unofficial SiN Episodes Mod, I seem to have an odd

 error.

 I have loaded a few models using my own array in hl2mp_player.cpp
 which does everything the same as the humans and combine. So I can get

 the models in the game that is not the problem.

 I have added the 3 corresponding files and folders:
 materials\VGUI\playermodels\characters\Blade\Blade.vmt
 materials\VGUI\playermodels\characters\Jessica\Jessica.vmt
 materials\VGUI\playermodels\characters\SiNTekGrunt\sintekgrunt.vmt

 With corresponding vtf files, now Blade and Jessica work fine off
 selecting their image off the menu, but if I select sintekgrunt,
 cl_playermodel only returns

 models\characters\SinTekGrunt\sintekgr.mdl -- with the unt missing
 off the end, as if there's a limit somewhere, I have looked in the
 source code for it, but I can't find the method the Apply or Ok in
 VGUI is calling, so have I access to it? or do I have to extract it
 out of the gcf and load it from a different address without this
limit?

 Any help would be appreciated.

 Sarkie
 --

 ___
 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] DLL_MessageEnd: Refusing to send user message %s of %d bytes to client, user message size limit is 255 bytes

2007-03-04 Thread Yahn Bernier
The internal #define is 255 characters.
Not sure what the 3 bytes of overhead is.  Are you saying that when you
parse a message out of the bf_read, you have to discard the first three
bytes, or that the payload is only 252 bytes or less?

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Sunday, March 04, 2007 10:33 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] DLL_MessageEnd: Refusing to send user message %s
of %d bytes to client, user message size limit is 255 bytes

I worked around this issue by implementing a queue system which sends a
max of X bytes in each user message per server frame, along with client
functionality to collect all the tiny messages and reassemble the
original larger message.

There also seems to be 3 bytes of overhead at the beginning of bf_read
data buffer.  So seemingly the max size available to the user is 252,
not 255?  Those 3 bytes are unreferenced in the SDK as far as I can
tell, and seem to be internal to the closed-source size of things.

I chose 200 for X to be safe since the 255 limit is seemingly
undocumented, and the scary extra bytes at the beginning might possibly
change at any time.  It'd be nice if someone (Valve?) would confirm what
the max value really is, and/or what constant to use for the max size.


At 2007/03/03 11:54 PM, you wrote:
Well in this particular case I am sending an arbitrarily-sized list of
RPG character related data to the user.  Any fixed limit would be
undesirable.  A larger limit (4K) would be acceptable, since, in
practice the maximum amount of data is probably about 1K.

As I understand it, the string tables are sent to all clients.  I don't
want to spam every client with this data, since it's only useful to the
client that it's directed at.

At 2007/03/03 11:31 PM, LDuke wrote:
--
[ Picked text/plain from multipart/alternative ] What kind of user
message is this?

The MOTD messages are limited to 255 bytes for TYPE_TEXT. To use more
than that, you have to add the text to be displayed to the string
tables and use TYPE_INDEX (this method has a limit of around 4kb).

On 3/3/07, [EMAIL PROTECTED]
[EMAIL PROTECTED]
wrote:

 Whenever an attempt is made to send anything but the very smallest
 of user messages, the following error occurs:

 DLL_MessageEnd:  Refusing to send user message %s of %d bytes to
 client, user message size limit is 255 bytes

 It doesn't have anything to do with the usermessages-Register
 specified limit.  It also seems completely unrelated to the value
 the bf_write::GetNumBytesLeft reports, which is typically in the
 2600 range or so.  So the question is, where is this number coming
 from, and can it be increased?

 ___
 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] DLL_MessageEnd: Refusing to send user message %s of %d bytes to client, user message size limit is 255 bytes

2007-03-04 Thread Yahn Bernier
The internal buffer's are much larger (~2500 bytes) since they are used
for other possible messages.  I'll see about setting the exact sizes so
the GetBytesRemaining would be correct.

We can see about raising the limit on UserMessage sizes at the same
time.  Still, the splitting thing you mentioned is a good workaround for
very large payloads.

The limit is enforced on the server, so I think you'll get all 255 for
payload.  The bf_read sounds like it has been pre-parsed up to the start
of the payload.

I'll check this out in the next few days since I've been messing around
with the public code a bit.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Sunday, March 04, 2007 12:14 PM
To: hlcoders@list.valvesoftware.com; hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] DLL_MessageEnd: Refusing to send user message %s
of %d bytes to client, user message size limit is 255 bytes

Thanks - can that internal value be exported somehow?
bf_write::GetNumBitsLeft() doesn't seem to know about it, for instance,
and thinks the limit is much higher.

The first 3 bytes of bf_read::m_pData always contain some seemingly
somewhat random bytes of data, although if I recall correctly the first
two were always 0x17 and 0x03 or something like that.  bf_read::Read*()
ignore those first few bytes because the m_iCurBit data member always
starts out just past those bytes at 24 or so, so the API functions
correctly from that perspective.  It's just a concern that that extra
data might steal at random from the 255 limit.

At 2007/03/04 02:03 PM, Yahn Bernier wrote:
The internal #define is 255 characters.
Not sure what the 3 bytes of overhead is.  Are you saying that when you

parse a message out of the bf_read, you have to discard the first three

bytes, or that the payload is only 252 bytes or less?

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Sunday, March 04, 2007 10:33 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] DLL_MessageEnd: Refusing to send user message
%s of %d bytes to client, user message size limit is 255 bytes

I worked around this issue by implementing a queue system which sends a

max of X bytes in each user message per server frame, along with client

functionality to collect all the tiny messages and reassemble the
original larger message.

There also seems to be 3 bytes of overhead at the beginning of bf_read
data buffer.  So seemingly the max size available to the user is 252,
not 255?  Those 3 bytes are unreferenced in the SDK as far as I can
tell, and seem to be internal to the closed-source size of things.

I chose 200 for X to be safe since the 255 limit is seemingly
undocumented, and the scary extra bytes at the beginning might possibly

change at any time.  It'd be nice if someone (Valve?) would confirm
what the max value really is, and/or what constant to use for the max
size.


At 2007/03/03 11:54 PM, you wrote:
Well in this particular case I am sending an arbitrarily-sized list of
RPG character related data to the user.  Any fixed limit would be
undesirable.  A larger limit (4K) would be acceptable, since, in
practice the maximum amount of data is probably about 1K.

As I understand it, the string tables are sent to all clients.  I
don't
want to spam every client with this data, since it's only useful to the

client that it's directed at.

At 2007/03/03 11:31 PM, LDuke wrote:
--
[ Picked text/plain from multipart/alternative ] What kind of user
message is this?

The MOTD messages are limited to 255 bytes for TYPE_TEXT. To use more

than that, you have to add the text to be displayed to the string
tables and use TYPE_INDEX (this method has a limit of around 4kb).

On 3/3/07, [EMAIL PROTECTED]
[EMAIL PROTECTED]
wrote:

 Whenever an attempt is made to send anything but the very smallest
 of user messages, the following error occurs:

 DLL_MessageEnd:  Refusing to send user message %s of %d bytes to
 client, user message size limit is 255 bytes

 It doesn't have anything to do with the usermessages-Register
 specified limit.  It also seems completely unrelated to the value
 the bf_write::GetNumBytesLeft reports, which is typically in the
 2600 range or so.  So the question is, where is this number coming
 from, and can it be increased?

 ___
 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] SetHearingOrigin and sound spatialization

2007-02-26 Thread Yahn Bernier
Yeah, this feature was never completed.  The actual up, right, and fwd
vectors as passed down into the sound system, but they don't get used
except in narrow circumstances.  I'll see how hard it would be to hook
them in and where the best spot would be -- or whether there is a
workaround.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John Sheu
Sent: Sunday, February 25, 2007 9:47 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] SetHearingOrigin and sound spatialization

On Sunday 25 February 2007 11:23 pm, Jared Combs wrote:
 That is unfortunate.  Once I finish the game, I suppose I'll have to
 go back and write my own sound emitter.  It seems strange that valve
 would make the assumption that no players would ever roll in a 3D
 engine.  Thank you for your rapid response.

I don't find it that odd, actually.  Source is targeted pretty narrowly
at first-person games; such games usually don't have complete freedom of
roll.
The engine does what it's designed for well, at the cost of cutting the
corner cases.

-John Sheu

___
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] Downloadables Bug? VALVE?

2007-02-24 Thread Yahn Bernier
Yes, that was sounds in embedded .zip files in .bsps.  That was the
thing I was thinking I had fixed.

Although that one was fixed, if the sound was put into the downloadables
string table like the plugin was doing, I hadn't tested or fixed that
case.

I've got the downloads one working for sounds now, but I need to fix it
in general for other non-sound things in the downloads list (and other
non-sound things in bsp .zip files).

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jay C.
Sent: Friday, February 23, 2007 7:13 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Downloadables Bug? VALVE?

Yahn, ring any bells? 21 MARCH 06 =[

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:hlcoders-
 [EMAIL PROTECTED] On Behalf Of Yahn Bernier
 Sent: 21 March 2006 02:01
 To: hlcoders@list.valvesoftware.com
 Subject: RE: [hlcoders] Sound downloads.

 Unfortunately it required changes to the file system and the engine so

 it's not on the immediate slate for release.  It's definitely in the
 pipeline for release though.  No definite ETA, but hopefully in the
 next couple of months.

 Yahn


From [EMAIL PROTECTED] Mon Mar 20 15:33:10 2006
Received: from [70.84.243.162] (helo=gator12.hostgator.com)
by list.valvesoftware.com with esmtp (Exim 3.35 #1 (Debian))
id 1FLTs5-pM-00
for hlcoders@list.valvesoftware.com; Mon, 20 Mar 2006 15:33:09
-0800
Received: from [86.42.5.157] (port=64823 helo=eliteprodigy3)
by gator12.hostgator.com with esmtp (Exim 4.52)
id 1FLUBF-0008Uc-VV
for hlcoders@list.valvesoftware.com; Mon, 20 Mar 2006 18:52:58
-0500
From: Jay C. [EMAIL PROTECTED]
To: hlcoders@list.valvesoftware.com
Message-ID:
!!AAAYAJOXbHHM0eJMtFLS0/fUXkvCgAAAEPOSK1b0nO1Dkxa2
9w/g
[EMAIL PROTECTED]
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
Thread-Index: AcZMeWyLr40FLvdHS3qGJ/pYHRLLeQ==
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
X-AntiAbuse: This header was added to track abuse, please include it
with any abuse report
X-AntiAbuse: Primary Hostname - gator12.hostgator.com
X-AntiAbuse: Original Domain - list.valvesoftware.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - c0ld.net
X-Source:
X-Source-Args:
X-Source-Dir:
content-transfer-encoding: 7bit
content-type: text/plain;
 charset=us-ascii
Subject: [hlcoders] Sound downloads.
Sender: [EMAIL PROTECTED]
Errors-To: [EMAIL PROTECTED]
X-BeenThere: hlcoders@list.valvesoftware.com
X-Mailman-Version: 2.0.11
Precedence: bulk
Reply-To: hlcoders@list.valvesoftware.com
List-Help: mailto:[EMAIL PROTECTED]
List-Post: mailto:hlcoders@list.valvesoftware.com
List-Subscribe:
http://list.valvesoftware.com/mailman/listinfo/hlcoders,

mailto:[EMAIL PROTECTED]
List-Id: Discussion of Half-Life Programming
hlcoders.list.valvesoftware.com
List-Unsubscribe:
http://list.valvesoftware.com/mailman/listinfo/hlcoders,

mailto:[EMAIL PROTECTED]
List-Archive: http://list.valvesoftware.com/mailman/private/hlcoders/
Date: Mon Mar 20 15:36:02 2006
X-Original-Date: Mon, 20 Mar 2006 23:53:02 -

I'm just wondering is there a status on the sound download bug?

It has been reported a few times, you know, the one where sounds don't
work on the map on which they were downloaded, you have to restart your
client for them to work.

Is this actually a bug or one of the new features?



-

From [EMAIL PROTECTED] Mon Mar 20 15:45:31 2006
Received: from [207.173.176.199] (helo=smtp3.valvesoftware.com)
by list.valvesoftware.com with esmtp (Exim 3.35 #1 (Debian))
id 1FLU43-0001Uq-00
for hlcoders@list.valvesoftware.com; Mon, 20 Mar 2006 15:45:31
-0800
Received: from [207.173.178.81] (helo=exchange2.valvesoftware.com)
by smtp3.valvesoftware.com with esmtp (Exim 3.35 #1 (Debian))
id 1FLUkB-0002x8-00
for hlcoders@list.valvesoftware.com; Mon, 20 Mar 2006 16:29:03
-0800
Content-class: urn:content-classes:message
MIME-Version: 1.0
X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
Subject: RE: [hlcoders] Sound downloads.
Message-ID:
[EMAIL PROTECTED]
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: [hlcoders] Sound downloads.
Thread-Index: AcZMeWyLr40FLvdHS3qGJ/pYHRLLeQAAaeLA
From: Yahn Bernier [EMAIL PROTECTED]
To: hlcoders@list.valvesoftware.com
X-Valve-MailScanner-Information: Please contact the System Administrator
for more information
X-Valve-MailScanner: Found to be clean
X-Valve-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin
(score=0,
required 6)
content-transfer-encoding: 7bit
content-type: text/plain;
 charset=US-ASCII
Sender: [EMAIL PROTECTED]
Errors-To: [EMAIL PROTECTED]
X-BeenThere: hlcoders@list.valvesoftware.com
X-Mailman-Version: 2.0.11
Precedence: bulk
Reply-To: hlcoders@list.valvesoftware.com
List-Help: mailto:[EMAIL PROTECTED]
List

RE: [hlcoders] Downloadables Bug? VALVE?

2007-02-24 Thread Yahn Bernier
No ETA, probably in the next few weeks though.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ratman2000
Sent: Saturday, February 24, 2007 12:44 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Downloadables Bug? VALVE?

Hello Yahn,

sounds is the biggest problem, so when its fixed for sounds, its realy
nice
:)
With models i dont have problems now but i dont do realy much with
models or decals.

Is there a release date for the new engine update with the sound bug
fix?

Thank for your great help Yahn!!!

With friendly Reguards from Germany

Ratman2000

- Original Message -
From: Yahn Bernier [EMAIL PROTECTED]
To: hlcoders@list.valvesoftware.com
Sent: Saturday, February 24, 2007 5:22 PM
Subject: RE: [hlcoders] Downloadables Bug? VALVE?


 Yes, that was sounds in embedded .zip files in .bsps.  That was the
 thing I was thinking I had fixed.

 Although that one was fixed, if the sound was put into the
 downloadables string table like the plugin was doing, I hadn't tested
 or fixed that case.

 I've got the downloads one working for sounds now, but I need to fix
 it in general for other non-sound things in the downloads list (and
 other non-sound things in bsp .zip files).

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Jay C.
 Sent: Friday, February 23, 2007 7:13 PM
 To: hlcoders@list.valvesoftware.com
 Subject: RE: [hlcoders] Downloadables Bug? VALVE?

 Yahn, ring any bells? 21 MARCH 06 =[

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:hlcoders-
 [EMAIL PROTECTED] On Behalf Of Yahn Bernier
 Sent: 21 March 2006 02:01
 To: hlcoders@list.valvesoftware.com
 Subject: RE: [hlcoders] Sound downloads.

 Unfortunately it required changes to the file system and the engine
 so

 it's not on the immediate slate for release.  It's definitely in the
 pipeline for release though.  No definite ETA, but hopefully in the
 next couple of months.

 Yahn


 From [EMAIL PROTECTED] Mon Mar 20 15:33:10 2006
 Received: from [70.84.243.162] (helo=gator12.hostgator.com) by
 list.valvesoftware.com with esmtp (Exim 3.35 #1 (Debian)) id
 1FLTs5-pM-00 for hlcoders@list.valvesoftware.com; Mon, 20 Mar
 2006 15:33:09 -0800
 Received: from [86.42.5.157] (port=64823 helo=eliteprodigy3) by
 gator12.hostgator.com with esmtp (Exim 4.52) id 1FLUBF-0008Uc-VV for
 hlcoders@list.valvesoftware.com; Mon, 20 Mar 2006 18:52:58 -0500
 From: Jay C. [EMAIL PROTECTED]
 To: hlcoders@list.valvesoftware.com
 Message-ID:
 !!AAAYAJOXbHHM0eJMtFLS0/fUXkvCgAAAEPOSK1b0nO1Dkx
 a2
 9w/g
 [EMAIL PROTECTED]
 MIME-Version: 1.0
 X-Mailer: Microsoft Office Outlook 11
 Thread-Index: AcZMeWyLr40FLvdHS3qGJ/pYHRLLeQ==
 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
 X-AntiAbuse: This header was added to track abuse, please include it
 with any abuse report
 X-AntiAbuse: Primary Hostname - gator12.hostgator.com
 X-AntiAbuse: Original Domain - list.valvesoftware.com
 X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
 X-AntiAbuse: Sender Address Domain - c0ld.net
 X-Source:
 X-Source-Args:
 X-Source-Dir:
 content-transfer-encoding: 7bit
 content-type: text/plain;
 charset=us-ascii
 Subject: [hlcoders] Sound downloads.
 Sender: [EMAIL PROTECTED]
 Errors-To: [EMAIL PROTECTED]
 X-BeenThere: hlcoders@list.valvesoftware.com
 X-Mailman-Version: 2.0.11
 Precedence: bulk
 Reply-To: hlcoders@list.valvesoftware.com
 List-Help:
 mailto:[EMAIL PROTECTED]
 List-Post: mailto:hlcoders@list.valvesoftware.com
 List-Subscribe:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders,

 mailto:[EMAIL PROTECTED]
 List-Id: Discussion of Half-Life Programming
 hlcoders.list.valvesoftware.com
 List-Unsubscribe:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders,

 mailto:[EMAIL PROTECTED]
 List-Archive:
 http://list.valvesoftware.com/mailman/private/hlcoders/
 Date: Mon Mar 20 15:36:02 2006
 X-Original-Date: Mon, 20 Mar 2006 23:53:02 -

 I'm just wondering is there a status on the sound download bug?

 It has been reported a few times, you know, the one where sounds don't

 work on the map on which they were downloaded, you have to restart
 your client for them to work.

 Is this actually a bug or one of the new features?

 --
 --
 
 -

 From [EMAIL PROTECTED] Mon Mar 20 15:45:31 2006
 Received: from [207.173.176.199] (helo=smtp3.valvesoftware.com) by
 list.valvesoftware.com with esmtp (Exim 3.35 #1 (Debian)) id
 1FLU43-0001Uq-00 for hlcoders@list.valvesoftware.com; Mon, 20 Mar
 2006 15:45:31 -0800
 Received: from [207.173.178.81] (helo=exchange2.valvesoftware.com)
 by smtp3.valvesoftware.com with esmtp (Exim 3.35 #1 (Debian)) id
 1FLUkB-0002x8-00 for hlcoders@list.valvesoftware.com; Mon, 20 Mar
 2006 16:29:03 -0800
 Content-class: urn:content-classes:message
 MIME-Version: 1.0
 X-MimeOLE: Produced By Microsoft Exchange

RE: [hlcoders] Downloadables Bug? VALVE?

2007-02-24 Thread Yahn Bernier
Sure

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of LDuke
Sent: Saturday, February 24, 2007 6:04 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Downloadables Bug? VALVE?

--
[ Picked text/plain from multipart/alternative ] Another bug that's been
around for a while:

The CenterPrintText font definition is missing from ClientScheme.res so
that a HudMsg doesn't get displayed.  One of the guys at Turtlerock said
he'd add it to the to-do list months ago. Would it be possible to add
this fix to the next update also?

I've been trying to show a timer in an unobtrusive place on the screen
for a CAL match plugin for DODS, but there is really no way to do this
right now.
The plugin interface doesn't seem to obey the time parameter so can't be
updated (plus it prints right on top of the flag status icons), the
center say and hint text are too much in the way of the player's view.

It would be an easy fix, just need to add the font definition for
CenterPrintText to the ClientScheme.res file for CSS and DODS.

Thanks,

Grant
(L. Duke)

P.S. This is the definition I've been using to test but the players have
to download a fixed .res file manually:

CenterPrintText
{
1
{
nameTrebuchet MS
tall24
weight900
range0x 0x007F//Basic Latin
antialias 1
additive1
}
}

'

On 2/24/07, Yahn Bernier [EMAIL PROTECTED] wrote:

 No ETA, probably in the next few weeks though.

 Yahn



--

___
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] Downloadables Bug? VALVE?

2007-02-23 Thread Yahn Bernier
I put the files in a map .res file and it worked, but I'll test the code
they way you had it set up and see what the problem is.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ratman2000
Sent: Friday, February 23, 2007 2:05 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Downloadables Bug? VALVE?

Hello Jay,

yes thats the problem...

Anybody there join a server with custom content, he downloaded it but
cant hear the sounds...

I think nobody like to join a server, download mass custom files and
than have to close CS:S, remember the IP and start it again... Is there
a way to fix it?
I think when i download a map, what has custom ambient sounds, the
sounds i can hear...
but i dont know right now so i have to test it...

With friendly reguards

Ratman2000


- Original Message -
From: Jay Croghan [EMAIL PROTECTED]
To: hlcoders@list.valvesoftware.com
Sent: Friday, February 23, 2007 10:40 AM
Subject: RE: [hlcoders] Downloadables Bug? VALVE?


 Yahn,

 It doesn't matter how the materials or sounds are downloaded, .res or
 by adding it to the downloadables NetworkStringTable, the CS:S
 (HL2?) client still requires a restart before the content is usable.

 - Jay


 Quoting Yahn Bernier [EMAIL PROTECTED]:

 I need a little more info on this one, how are you registering the
 custom .wav (or other content) with the engine?  Are you creating a
 mapname.res file or using some other API to register it?

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 Ratman2000
 Sent: Sunday, February 18, 2007 10:39 PM
 To: hlcoders@list.valvesoftware.com
 Subject: [hlcoders] Downloadables Bug? VALVE?

 Hello,

 i have integrated in my CS:S Server Plugin an function to add Custom
 Sound Files...
 So i have added Sounds to this System and it works great but i have
 one problem...

 When i first time connect to the server, all content gets
downloaded...
 Then when i play the sounds by using:

 MRecipientFilter Filter;

 Filter.AddPlayer( i );
 Filter.MakeReliable();

 EngineSounds-EmitSound( Filter, PlayerIndex, CHAN_AUTO, SoundFile,
 EngineSounds-0.7,

 EngineSounds-0,
 0, 100, Origin );

 The sound file dont get played...

 When i then quit CS:S and start it again and connect to the same
 server, i dont get download content and all sounds plays fine...

 Who is the problem? Is it an Engine bug? Is there a workaround?

 Please help!

 With friendly reguards

 Ratman2000


 ___
 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] Downloadables Bug? VALVE?

2007-02-23 Thread Yahn Bernier
Okay.  I was able to repro this with the stringtable version and fix it.
The fix will go out some time in the next few weeks whenever we have an
engine update coming out.

I still need to look at models and materials/decals, too, since there
may be similar issues wrt those types of things.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ratman2000
Sent: Friday, February 23, 2007 9:04 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Downloadables Bug? VALVE?

Hello Yahn,

thanks for your help!

I think there is something to do after adding it in the
download-tables...

So the simplest way is to check, what the system does by loading the
*.res file!

With friendly reguards

Ratman2000

- Original Message -
From: Yahn Bernier [EMAIL PROTECTED]
To: hlcoders@list.valvesoftware.com
Sent: Friday, February 23, 2007 4:23 PM
Subject: RE: [hlcoders] Downloadables Bug? VALVE?


I put the files in a map .res file and it worked, but I'll test the
code  they way you had it set up and see what the problem is.

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Ratman2000
 Sent: Friday, February 23, 2007 2:05 AM
 To: hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] Downloadables Bug? VALVE?

 Hello Jay,

 yes thats the problem...

 Anybody there join a server with custom content, he downloaded it but
 cant hear the sounds...

 I think nobody like to join a server, download mass custom files and
 than have to close CS:S, remember the IP and start it again... Is
 there a way to fix it?
 I think when i download a map, what has custom ambient sounds, the
 sounds i can hear...
 but i dont know right now so i have to test it...

 With friendly reguards

 Ratman2000


 - Original Message -
 From: Jay Croghan [EMAIL PROTECTED]
 To: hlcoders@list.valvesoftware.com
 Sent: Friday, February 23, 2007 10:40 AM
 Subject: RE: [hlcoders] Downloadables Bug? VALVE?


 Yahn,

 It doesn't matter how the materials or sounds are downloaded, .res or

 by adding it to the downloadables NetworkStringTable, the CS:S
 (HL2?) client still requires a restart before the content is usable.

 - Jay


 Quoting Yahn Bernier [EMAIL PROTECTED]:

 I need a little more info on this one, how are you registering the
 custom .wav (or other content) with the engine?  Are you creating a
 mapname.res file or using some other API to register it?

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 Ratman2000
 Sent: Sunday, February 18, 2007 10:39 PM
 To: hlcoders@list.valvesoftware.com
 Subject: [hlcoders] Downloadables Bug? VALVE?

 Hello,

 i have integrated in my CS:S Server Plugin an function to add Custom

 Sound Files...
 So i have added Sounds to this System and it works great but i have
 one problem...

 When i first time connect to the server, all content gets
 downloaded...
 Then when i play the sounds by using:

 MRecipientFilter Filter;

 Filter.AddPlayer( i );
 Filter.MakeReliable();

 EngineSounds-EmitSound( Filter, PlayerIndex, CHAN_AUTO, SoundFile,
 EngineSounds-0.7,

 EngineSounds-0,
 0, 100, Origin );

 The sound file dont get played...

 When i then quit CS:S and start it again and connect to the same
 server, i dont get download content and all sounds plays fine...

 Who is the problem? Is it an Engine bug? Is there a workaround?

 Please help!

 With friendly reguards

 Ratman2000


 ___
 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



___
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] Downloadables Bug? VALVE?

2007-02-23 Thread Yahn Bernier
Yeah, I can see the general issue and it's a bit sticky.  It's
definitely fixable, but it might take a couple of days of mucking around
with stuff in the engine.

I should have it fixed pretty shortly though.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of LDuke
Sent: Friday, February 23, 2007 11:50 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Downloadables Bug? VALVE?

--
[ Picked text/plain from multipart/alternative ] I've heard from others
that there is an issue with some types of materials (decals?).

On 2/23/07, Yahn Bernier [EMAIL PROTECTED] wrote:

 Okay.  I was able to repro this with the stringtable version and fix
it.
 The fix will go out some time in the next few weeks whenever we have
 an engine update coming out.

 I still need to look at models and materials/decals, too, since there
 may be similar issues wrt those types of things.

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Ratman2000
 Sent: Friday, February 23, 2007 9:04 AM
 To: hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] Downloadables Bug? VALVE?

 Hello Yahn,

 thanks for your help!

 I think there is something to do after adding it in the
 download-tables...

 So the simplest way is to check, what the system does by loading the
 *.res file!

 With friendly reguards

 Ratman2000

 - Original Message -
 From: Yahn Bernier [EMAIL PROTECTED]
 To: hlcoders@list.valvesoftware.com
 Sent: Friday, February 23, 2007 4:23 PM
 Subject: RE: [hlcoders] Downloadables Bug? VALVE?


 I put the files in a map .res file and it worked, but I'll test the
 code  they way you had it set up and see what the problem is.
 
  Yahn
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of
  Ratman2000
  Sent: Friday, February 23, 2007 2:05 AM
  To: hlcoders@list.valvesoftware.com
  Subject: Re: [hlcoders] Downloadables Bug? VALVE?
 
  Hello Jay,
 
  yes thats the problem...
 
  Anybody there join a server with custom content, he downloaded it
  but cant hear the sounds...
 
  I think nobody like to join a server, download mass custom files and

  than have to close CS:S, remember the IP and start it again... Is
  there a way to fix it?
  I think when i download a map, what has custom ambient sounds, the
  sounds i can hear...
  but i dont know right now so i have to test it...
 
  With friendly reguards
 
  Ratman2000
 
 
  - Original Message -
  From: Jay Croghan [EMAIL PROTECTED]
  To: hlcoders@list.valvesoftware.com
  Sent: Friday, February 23, 2007 10:40 AM
  Subject: RE: [hlcoders] Downloadables Bug? VALVE?
 
 
  Yahn,
 
  It doesn't matter how the materials or sounds are downloaded, .res
  or

  by adding it to the downloadables NetworkStringTable, the CS:S
  (HL2?) client still requires a restart before the content is
usable.
 
  - Jay
 
 
  Quoting Yahn Bernier [EMAIL PROTECTED]:
 
  I need a little more info on this one, how are you registering the

  custom .wav (or other content) with the engine?  Are you creating
  a mapname.res file or using some other API to register it?
 
  Yahn
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of
  Ratman2000
  Sent: Sunday, February 18, 2007 10:39 PM
  To: hlcoders@list.valvesoftware.com
  Subject: [hlcoders] Downloadables Bug? VALVE?
 
  Hello,
 
  i have integrated in my CS:S Server Plugin an function to add
  Custom

  Sound Files...
  So i have added Sounds to this System and it works great but i
  have one problem...
 
  When i first time connect to the server, all content gets
  downloaded...
  Then when i play the sounds by using:
 
  MRecipientFilter Filter;
 
  Filter.AddPlayer( i );
  Filter.MakeReliable();
 
  EngineSounds-EmitSound( Filter, PlayerIndex, CHAN_AUTO,
  EngineSounds-SoundFile, 0.7,
 
  EngineSounds-0,
  0, 100, Origin );
 
  The sound file dont get played...
 
  When i then quit CS:S and start it again and connect to the same
  server, i dont get download content and all sounds plays fine...
 
  Who is the problem? Is it an Engine bug? Is there a workaround?
 
  Please help!
 
  With friendly reguards
 
  Ratman2000
 
 
  ___
  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

RE: [hlcoders] Resolve relative paths to full path?

2007-02-22 Thread Yahn Bernier
Try it w/o the / in from of gameinfo.txt and it should work:

filesystem-RelativePathToFullPath(gameinfo.txt, MOD, fullpath,
sizeof(fullpath));

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Peloski
Sent: Wednesday, February 21, 2007 10:34 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Resolve relative paths to full path?

--
[ Picked text/plain from multipart/alternative ] Err.. maybe I spoke too
soon,

filesystem-RelativePathToFullPath(/gameinfo.txt, MOD, fullpath,
sizeof(fullpath));

Puts /gameinfo.txt in fullpath and returns NULL.. I wasn't sure about
MOD so I tried a few different things including NULL and it did the
same thing each time. Any ideas?

Regards,

Paul

On 2/22/07, Paul Peloski [EMAIL PROTECTED] wrote:

 Wow, how did I miss that. Thanks Yahn.

 Regards,

 Paul

 On 2/22/07, Yahn Bernier [EMAIL PROTECTED]  wrote:
 
  Try:  IFileSystem::RelativePathToFullPath
 
  You might need to have an actual filename under the subfolder, but
  that's the function I think you want.
 
  Yahn
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto: [EMAIL PROTECTED] On Behalf Of Paul
  Peloski
  Sent: Wednesday, February 21, 2007 8:26 PM
  To: hlcoders@list.valvesoftware.com
  Subject: [hlcoders] Resolve relative paths to full path?
 
  --
  [ Picked text/plain from multipart/alternative ] Hi guys,
 
  Is there an easy way to resolve the relative path:
 
  /resource/ to C:\Program
  Files\Steam\SteamApps\SourceMods\mod\resource\
 
  I looked through the SDK for a while but I couldn't find and easy
  solution.
  I stumbled on something that does part of what I want,
 
  CFSSteamSetupInfo info;
  FileSystem_SetupSteamEnvironment( info );
 
  Which will return the actual mod folder, but still I have to
  concatenate
 
  and massage the paths myself. Is there an easier way?
 
  Regards,
 
  Paul
  --
 
  ___
  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] Downloadables Bug? VALVE?

2007-02-22 Thread Yahn Bernier
I need a little more info on this one, how are you registering the
custom .wav (or other content) with the engine?  Are you creating a
mapname.res file or using some other API to register it?

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ratman2000
Sent: Sunday, February 18, 2007 10:39 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Downloadables Bug? VALVE?

Hello,

i have integrated in my CS:S Server Plugin an function to add Custom
Sound Files...
So i have added Sounds to this System and it works great but i have one
problem...

When i first time connect to the server, all content gets downloaded...
Then when i play the sounds by using:

MRecipientFilter Filter;

Filter.AddPlayer( i );
Filter.MakeReliable();

EngineSounds-EmitSound( Filter, PlayerIndex, CHAN_AUTO, SoundFile, 0.7,

EngineSounds-0,
0, 100, Origin );

The sound file dont get played...

When i then quit CS:S and start it again and connect to the same server,
i dont get download content and all sounds plays fine...

Who is the problem? Is it an Engine bug? Is there a workaround?

Please help!

With friendly reguards

Ratman2000


___
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] Replay Disappearing Bug

2007-02-21 Thread Yahn Bernier
Mike Dussault was going to look into it, but he's out of the office this
week so probably won't get to it until next week.

I might have a few minutes to check it out today though.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Meow Mew
Sent: Wednesday, February 21, 2007 7:33 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Replay Disappearing Bug

Hey Yahn,

I was curious if anybody over there had a chance to try the repro?  Just
wondering if there was any feedback.  You guys are really busy, so it
would be easy to slip through the cracks.


From: Yahn Bernier [EMAIL PROTECTED]
Reply-To: hlcoders@list.valvesoftware.com
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Replay Disappearing Bug
Date: Thu, 8 Feb 2007 11:32:45 -0800

We'll have someone here try and repro this.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Meow Mew
Sent: Thursday, February 08, 2007 11:25 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Replay Disappearing Bug

Here's a video displaying how the bug works. I apologize for the poor
quality, as YouTube managed to mangle the video quite a bit. The first
time the console is typed in is the beginning of the demo recording.
The second time is the ending of the demo recording. You can see that
the Alyx model reappears when the demo is no longer recording.

http://www.youtube.com/watch?v=d6WeCkEO8i4

Thanks goes out to previous answers, but none of the animation changes
mentioned previously had any effect.  I could really use some help in
figuring this one out.  A Find in Files involving anything to do with
demo recording and playback doesn't bring any clear answer to focus.
Any other suggestions or assistance is definitely appreciated.

 From: Meow Mew [EMAIL PROTECTED]
 Reply-To: hlcoders@list.valvesoftware.com
 To: hlcoders@list.valvesoftware.com
 Subject: [hlcoders] Replay Disappearing Bug
 Date: Wed, 07 Feb 2007 15:58:12 -0500
 
 I was hoping somebody could point me in the right direction for
 resolving a bug I came across.  I do work with a valid liscence of
 all of the Valve engine, so please don't hesitate to point me in the
 right direction if you happen to be a Valve employee (if you use
 generic terms to avoid posting non-SDK code I would still appreciate
 it
tremendously).
 
 During the recording of a replay (DEM file) in a single-player game,
 I found that characters playing an animation can stop rendering
 themselves after colliding with the player.  An easy re-creation of
 this is to make a high area to jump off of onto a characters head
 (try not to at the character during collision).  If an animation was
 setup through VCD or scripted sequence, the model will cease to
 render for that instance of the character.
   The model will render again if that entire visibility set reloads
 (walking behind an occluder also seems to work).
 
 This only happens while recording a DEM file, and also only happens
 if the character is animated.  The collision does NOT need to be with

 the player (I've seen it happen when a character ran into a mailbox),

 but I

 do believe the player has to not be looking directly at the character

 when it vanishes.
   Also, this is even EASIER to create if you set the solid type of
 the character to SOLID_VPHYSICS instead of SOLID_BBOX.
 
 I really need to be able to record a run of the world with no obvious

 flaws that would change the users experience.  We're using the demo
 playbacks to overlay eye-tracking information and change textures
 during the playback for pixel detection of entities.  The user would
 most likely change his/her natural eye responses if objects vanish,
 and

 this hurts the results of the research studies.  Please help if you
 can!
 
 _
 Laugh, share and connect with Windows Live Messenger

http://clk.atdmt.com/MSN/go/msnnkwme002001msn/direct/01/?href=http:
 //imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource
 =h
 mtagline
 
 
 ___
 To unsubscribe, edit your list preferences, or view the list
 archives, please visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders
 

_
From predictions to trailers, check out the MSN Entertainment Guide to
the Academy Awards(r)
http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline1


___
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


_
Find what you need

RE: [hlcoders] Downloadables Bug? VALVE?

2007-02-21 Thread Yahn Bernier
Not yet that I'm aware of

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ratman2000
Sent: Wednesday, February 21, 2007 10:45 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Downloadables Bug? VALVE?

Hello Yahn,

is there somthing corrected in the next update? :)

Thanks!

With friendly reguards

Ratman2000

- Original Message -
From: Yahn Bernier [EMAIL PROTECTED]
To: hlcoders@list.valvesoftware.com
Sent: Tuesday, February 20, 2007 4:30 PM
Subject: RE: [hlcoders] Downloadables Bug? VALVE?


I remember looking at something like this a while back.  I'll take
another look for you guys and see what's up.

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Jay
 Croghan
 Sent: Monday, February 19, 2007 1:20 AM
 To: hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] Downloadables Bug? VALVE?

 This has been a bug since CS:S was released and they have verified
 it's a bug. We were told over a year ago that it would take some major

 engine updates and that it would be rolled out within a few months. As

 usual though the time line was a little underestimated and we are
 still sitting here using a broken interface.

 The worst part about it is trying to test new materials/models/sounds,

 because I have to restart my client after the download to verify it as

 a success.

 Valve: Any updates on this issue? It can't be too hard to change one
 line of code to close the file handle on the client after you write
 the file can it?

 - Jay


 Quoting Ratman2000 [EMAIL PROTECTED]:

 Hello,

 i have integrated in my CS:S Server Plugin an function to add Custom
 Sound Files...
 So i have added Sounds to this System and it works great but i have
 one problem...

 When i first time connect to the server, all content gets
 downloaded...
 Then when i play the sounds by using:

 MRecipientFilter Filter;

 Filter.AddPlayer( i );
 Filter.MakeReliable();

 EngineSounds-EmitSound( Filter, PlayerIndex, CHAN_AUTO, SoundFile,
 EngineSounds-0.7,  0,
 0, 100, Origin );

 The sound file dont get played...

 When i then quit CS:S and start it again and connect to the same
 server, i dont get download content and all sounds plays fine...

 Who is the problem? Is it an Engine bug? Is there a workaround?

 Please help!

 With friendly reguards

 Ratman2000


 ___
 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] Downloadables Bug? VALVE?

2007-02-21 Thread Yahn Bernier
Sure

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ratman2000
Sent: Wednesday, February 21, 2007 11:07 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Downloadables Bug? VALVE?

Hello Yahn,

ok :'(
Can you inform us over this tread, when you have found this bug?

Thanks from germany!

With friendly Reguards

Ratman2000

- Original Message -
From: Yahn Bernier [EMAIL PROTECTED]
To: hlcoders@list.valvesoftware.com
Sent: Wednesday, February 21, 2007 7:53 PM
Subject: RE: [hlcoders] Downloadables Bug? VALVE?


 Not yet that I'm aware of

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Ratman2000
 Sent: Wednesday, February 21, 2007 10:45 AM
 To: hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] Downloadables Bug? VALVE?

 Hello Yahn,

 is there somthing corrected in the next update? :)

 Thanks!

 With friendly reguards

 Ratman2000

 - Original Message -
 From: Yahn Bernier [EMAIL PROTECTED]
 To: hlcoders@list.valvesoftware.com
 Sent: Tuesday, February 20, 2007 4:30 PM
 Subject: RE: [hlcoders] Downloadables Bug? VALVE?


I remember looking at something like this a while back.  I'll take
another look for you guys and see what's up.

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Jay
 Croghan
 Sent: Monday, February 19, 2007 1:20 AM
 To: hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] Downloadables Bug? VALVE?

 This has been a bug since CS:S was released and they have verified
 it's a bug. We were told over a year ago that it would take some
 major

 engine updates and that it would be rolled out within a few months.
 As

 usual though the time line was a little underestimated and we are
 still sitting here using a broken interface.

 The worst part about it is trying to test new
 materials/models/sounds,

 because I have to restart my client after the download to verify it
 as

 a success.

 Valve: Any updates on this issue? It can't be too hard to change one
 line of code to close the file handle on the client after you write
 the file can it?

 - Jay


 Quoting Ratman2000 [EMAIL PROTECTED]:

 Hello,

 i have integrated in my CS:S Server Plugin an function to add Custom

 Sound Files...
 So i have added Sounds to this System and it works great but i have
 one problem...

 When i first time connect to the server, all content gets
 downloaded...
 Then when i play the sounds by using:

 MRecipientFilter Filter;

 Filter.AddPlayer( i );
 Filter.MakeReliable();

 EngineSounds-EmitSound( Filter, PlayerIndex, CHAN_AUTO, SoundFile,
 EngineSounds-0.7,  0,
 0, 100, Origin );

 The sound file dont get played...

 When i then quit CS:S and start it again and connect to the same
 server, i dont get download content and all sounds plays fine...

 Who is the problem? Is it an Engine bug? Is there a workaround?

 Please help!

 With friendly reguards

 Ratman2000


 ___
 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



___
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] Replay Disappearing Bug

2007-02-21 Thread Yahn Bernier
Can you email me the test map you were using and tell me which code base
you started with (was it the hl2 or hl2mp code?)

Yahn

[EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Meow Mew
Sent: Thursday, February 08, 2007 11:50 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Replay Disappearing Bug

Many thanks Yahn!

If it helps to reproduce it, I can give a few more details about how I
commonly ran tests.  Currently, our MOD does not have the npc_alyx in
it, so that movie was using cycler_actor with the Alyx model assigned.
The animation was done with a scripted sequence (start on spawn) of the
sexyidle animation.

I've gotten it to work with all of our custom models, classes, and
animations, but just wanted to be sure I gave details on how I
reproduced it with content that wasn't in-house.

From: Yahn Bernier [EMAIL PROTECTED]
Reply-To: hlcoders@list.valvesoftware.com
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Replay Disappearing Bug
Date: Thu, 8 Feb 2007 11:32:45 -0800

We'll have someone here try and repro this.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Meow Mew
Sent: Thursday, February 08, 2007 11:25 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Replay Disappearing Bug

Here's a video displaying how the bug works. I apologize for the poor
quality, as YouTube managed to mangle the video quite a bit. The first
time the console is typed in is the beginning of the demo recording.
The second time is the ending of the demo recording. You can see that
the Alyx model reappears when the demo is no longer recording.

http://www.youtube.com/watch?v=d6WeCkEO8i4

Thanks goes out to previous answers, but none of the animation changes
mentioned previously had any effect.  I could really use some help in
figuring this one out.  A Find in Files involving anything to do with
demo recording and playback doesn't bring any clear answer to focus.
Any other suggestions or assistance is definitely appreciated.

 From: Meow Mew [EMAIL PROTECTED]
 Reply-To: hlcoders@list.valvesoftware.com
 To: hlcoders@list.valvesoftware.com
 Subject: [hlcoders] Replay Disappearing Bug
 Date: Wed, 07 Feb 2007 15:58:12 -0500
 
 I was hoping somebody could point me in the right direction for
 resolving a bug I came across.  I do work with a valid liscence of
 all of the Valve engine, so please don't hesitate to point me in the
 right direction if you happen to be a Valve employee (if you use
 generic terms to avoid posting non-SDK code I would still appreciate
 it
tremendously).
 
 During the recording of a replay (DEM file) in a single-player game,
 I found that characters playing an animation can stop rendering
 themselves after colliding with the player.  An easy re-creation of
 this is to make a high area to jump off of onto a characters head
 (try not to at the character during collision).  If an animation was
 setup through VCD or scripted sequence, the model will cease to
 render for that instance of the character.
   The model will render again if that entire visibility set reloads
 (walking behind an occluder also seems to work).
 
 This only happens while recording a DEM file, and also only happens
 if the character is animated.  The collision does NOT need to be with

 the player (I've seen it happen when a character ran into a mailbox),

 but I

 do believe the player has to not be looking directly at the character

 when it vanishes.
   Also, this is even EASIER to create if you set the solid type of
 the character to SOLID_VPHYSICS instead of SOLID_BBOX.
 
 I really need to be able to record a run of the world with no obvious

 flaws that would change the users experience.  We're using the demo
 playbacks to overlay eye-tracking information and change textures
 during the playback for pixel detection of entities.  The user would
 most likely change his/her natural eye responses if objects vanish,
 and

 this hurts the results of the research studies.  Please help if you
 can!
 
 _
 Laugh, share and connect with Windows Live Messenger

http://clk.atdmt.com/MSN/go/msnnkwme002001msn/direct/01/?href=http:
 //imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource
 =h
 mtagline
 
 
 ___
 To unsubscribe, edit your list preferences, or view the list
 archives, please visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders
 

_
From predictions to trailers, check out the MSN Entertainment Guide to
the Academy Awards(r)
http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline1


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

RE: [hlcoders] Resolve relative paths to full path?

2007-02-21 Thread Yahn Bernier
Try:  IFileSystem::RelativePathToFullPath

You might need to have an actual filename under the subfolder, but
that's the function I think you want.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Peloski
Sent: Wednesday, February 21, 2007 8:26 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Resolve relative paths to full path?

--
[ Picked text/plain from multipart/alternative ] Hi guys,

Is there an easy way to resolve the relative path:

/resource/ to C:\Program Files\Steam\SteamApps\SourceMods\mod\resource\

I looked through the SDK for a while but I couldn't find and easy
solution.
I stumbled on something that does part of what I want,

CFSSteamSetupInfo info;
FileSystem_SetupSteamEnvironment( info );

Which will return the actual mod folder, but still I have to concatenate
and massage the paths myself. Is there an easier way?

Regards,

Paul
--

___
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] Downloadables Bug? VALVE?

2007-02-20 Thread Yahn Bernier
I remember looking at something like this a while back.  I'll take
another look for you guys and see what's up.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jay Croghan
Sent: Monday, February 19, 2007 1:20 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Downloadables Bug? VALVE?

This has been a bug since CS:S was released and they have verified it's
a bug. We were told over a year ago that it would take some major engine
updates and that it would be rolled out within a few months. As usual
though the time line was a little underestimated and we are still
sitting here using a broken interface.

The worst part about it is trying to test new materials/models/sounds,
because I have to restart my client after the download to verify it as a
success.

Valve: Any updates on this issue? It can't be too hard to change one
line of code to close the file handle on the client after you write the
file can it?

- Jay


Quoting Ratman2000 [EMAIL PROTECTED]:

 Hello,

 i have integrated in my CS:S Server Plugin an function to add Custom
 Sound Files...
 So i have added Sounds to this System and it works great but i have
 one problem...

 When i first time connect to the server, all content gets
downloaded...
 Then when i play the sounds by using:

 MRecipientFilter Filter;

 Filter.AddPlayer( i );
 Filter.MakeReliable();

 EngineSounds-EmitSound( Filter, PlayerIndex, CHAN_AUTO, SoundFile,
 EngineSounds-0.7,  0,
 0, 100, Origin );

 The sound file dont get played...

 When i then quit CS:S and start it again and connect to the same
 server, i dont get download content and all sounds plays fine...

 Who is the problem? Is it an Engine bug? Is there a workaround?

 Please help!

 With friendly reguards

 Ratman2000


 ___
 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] Animation timing tag extraction

2007-02-20 Thread Yahn Bernier
Faceposer code which parses the info:

bool CChoreoView::AutoaddGestureKeys( CChoreoEvent *e, bool checkonly )
{
StudioModel *model = FindAssociatedModel( e-GetScene(),
e-GetActor() );
if ( !model )
return false;

if ( !model-GetStudioHdr() )
return false;

int iSequence = model-LookupSequence( e-GetParameters() );
if ( iSequence  0 )
return false;

KeyValues *seqKeyValues = new KeyValues();
if ( seqKeyValues-LoadFromBuffer( model-GetFileName( ),
model-GetKeyValueText( iSequence ) ) )
{
// Do we have a build point section?
KeyValues *pkvAllFaceposer =
seqKeyValues-FindKey(faceposer);
if ( pkvAllFaceposer )
{
// Start grabbing the sounds and slotting them
in
KeyValues *pkvFaceposer;
char
szStartLoop[CEventAbsoluteTag::MAX_EVENTTAG_LENGTH] = { loop };
char
szEndLoop[CEventAbsoluteTag::MAX_EVENTTAG_LENGTH] = { end };
char
szEntry[CEventAbsoluteTag::MAX_EVENTTAG_LENGTH] = { apex };
char
szExit[CEventAbsoluteTag::MAX_EVENTTAG_LENGTH] = { end };

for ( pkvFaceposer =
pkvAllFaceposer-GetFirstSubKey(); pkvFaceposer; pkvFaceposer =
pkvFaceposer-GetNextKey() )
{
if (!stricmp( pkvFaceposer-GetName(),
startloop ))
{
strcpy( szStartLoop,
pkvFaceposer-GetString() );
}
else if (!stricmp(
pkvFaceposer-GetName(), endloop ))
{
strcpy( szEndLoop,
pkvFaceposer-GetString() );
}
else if (!stricmp(
pkvFaceposer-GetName(), entrytag ))
{
strcpy( szEntry,
pkvFaceposer-GetString() );
}
else if (!stricmp(
pkvFaceposer-GetName(), exittag ))
{
strcpy( szExit,
pkvFaceposer-GetString() );
}
else if (!stricmp(
pkvFaceposer-GetName(), tags ))
{
KeyValues *pkvTags;
for ( pkvTags =
pkvFaceposer-GetFirstSubKey(); pkvTags; pkvTags = pkvTags-GetNextKey()
)
{
int maxFrame =
model-GetNumFrames( iSequence ) - 1;

if ( maxFrame  0)
{
float percentage
= (float)pkvTags-GetInt() / maxFrame;


CEventAbsoluteTag *ptag = e-FindAbsoluteTag( CChoreoEvent::ORIGINAL,
pkvTags-GetName() );
if (ptag)
{
//
reposition tag

ptag-SetPercentage( percentage );
}
else
{

e-AddAbsoluteTag( CChoreoEvent::ORIGINAL, pkvTags-GetName(),
percentage );

e-AddAbsoluteTag( CChoreoEvent::PLAYBACK, pkvTags-GetName(),
percentage );
}
// lock the
original tags so they can't be edited
ptag =
e-FindAbsoluteTag( CChoreoEvent::ORIGINAL, pkvTags-GetName() );
Assert( ptag );
ptag-SetLocked(
true );
}
}
e-VerifyTagOrder();
e-PreventTagOverlap();
}
}

// FIXME: lookup linear tags in sequence data
{
CEventAbsoluteTag *ptag;
ptag = e-FindAbsoluteTag(
CChoreoEvent::ORIGINAL, szStartLoop );
if (ptag)
{
ptag-SetLinear( true );
}
ptag = e-FindAbsoluteTag(
CChoreoEvent::PLAYBACK, szStartLoop );
 

RE: [hlcoders] Replay Disappearing Bug

2007-02-08 Thread Yahn Bernier
We'll have someone here try and repro this.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Meow Mew
Sent: Thursday, February 08, 2007 11:25 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Replay Disappearing Bug

Here's a video displaying how the bug works. I apologize for the poor
quality, as YouTube managed to mangle the video quite a bit. The first
time the console is typed in is the beginning of the demo recording. The
second time is the ending of the demo recording. You can see that the
Alyx model reappears when the demo is no longer recording.

http://www.youtube.com/watch?v=d6WeCkEO8i4

Thanks goes out to previous answers, but none of the animation changes
mentioned previously had any effect.  I could really use some help in
figuring this one out.  A Find in Files involving anything to do with
demo recording and playback doesn't bring any clear answer to focus.
Any other suggestions or assistance is definitely appreciated.

From: Meow Mew [EMAIL PROTECTED]
Reply-To: hlcoders@list.valvesoftware.com
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Replay Disappearing Bug
Date: Wed, 07 Feb 2007 15:58:12 -0500

I was hoping somebody could point me in the right direction for
resolving a bug I came across.  I do work with a valid liscence of all
of the Valve engine, so please don't hesitate to point me in the right
direction if you happen to be a Valve employee (if you use generic
terms to avoid posting non-SDK code I would still appreciate it
tremendously).

During the recording of a replay (DEM file) in a single-player game, I
found that characters playing an animation can stop rendering
themselves after colliding with the player.  An easy re-creation of
this is to make a high area to jump off of onto a characters head (try
not to at the character during collision).  If an animation was setup
through VCD or scripted sequence, the model will cease to render for
that instance of the character.
  The model will render again if that entire visibility set reloads
(walking behind an occluder also seems to work).

This only happens while recording a DEM file, and also only happens if
the character is animated.  The collision does NOT need to be with the
player (I've seen it happen when a character ran into a mailbox), but I

do believe the player has to not be looking directly at the character
when it vanishes.
  Also, this is even EASIER to create if you set the solid type of the
character to SOLID_VPHYSICS instead of SOLID_BBOX.

I really need to be able to record a run of the world with no obvious
flaws that would change the users experience.  We're using the demo
playbacks to overlay eye-tracking information and change textures
during the playback for pixel detection of entities.  The user would
most likely change his/her natural eye responses if objects vanish, and

this hurts the results of the research studies.  Please help if you
can!

_
Laugh, share and connect with Windows Live Messenger
http://clk.atdmt.com/MSN/go/msnnkwme002001msn/direct/01/?href=http:
//imagine-msn.com/messenger/launch80/default.aspx?locale=en-ussource=h
mtagline


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


_
From predictions to trailers, check out the MSN Entertainment Guide to
the Academy Awards(r)
http://movies.msn.com/movies/oscars2007/?icid=ncoscartagline1


___
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] KZMOD and the Wall Bug, we are back, and so is it.

2007-02-02 Thread Yahn Bernier
Wow, I would be happy to run your code in the debugger here at Valve to see if 
we can provide any suggestions or fixes for your particular issue.  Just drop 
me an email and we can coordinate...

Yahn Bernier
Sr. Engineer
Valve

Email:  [EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Lippert
Sent: Friday, February 02, 2007 2:48 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] KZMOD and the Wall Bug, we are back, and so is it.

Hello all again after a long abstinence, I'm SoUlFaThEr, from Kreedz 
Climbing/kzmod.

This is now my second attempt with a new programmer to stop the wall 
bug(prediction/interpolation/speedchangeproblem).
It's the main reason why everyone just stopped playing it, and dropped their 
servers. My programmer left out of pure frustration becasue of it and that 
broke it. Then I lost all the source files but the code, and I tossed in my 
chips for a bit.

A while back (last April) I wrote that the collision boxes were the cause and 
that it solved 95% of the problem. Im not sure exactly what it was that ended 
up shooting that down, but we are, right now, back to square one, and starting 
with a fresh programmer.

The Wall Bug is still not gone/solved, of course. Or is it? What I have heard 
from my present programmer so far:

Client and server speeds do not match and they dont even update at the same 
rate either. The moment our speed changes from either stopped, or full speed, 
and IS a number between or over them, everything lags out(spectator screen, 
demos, and the player himself). The server loses the player's position for up 
to 200 units away during this split second and when it updates, snaps you 
back.this is the quick glitch we see when we first hit the jump 
button(which if done right with a prestrafe, gives you a little speed boost). 
If we are falling or changing speed in any matter whatsoever, spectator lags 
like crazy, demos lag like crazy, everything lags like crazy. And thats where 
its driving usreally crazy. It's like some Devil saying, NO...you will not 
create a mod that people can enjoy. Anyone konw this Devil? Much of the time 
this will occur when we come into contact with a brush based wall.models of 
any sort, uneven ground displacements can also cause it becasue of the angles, 
and definately walls that are not square to the grid in hammer. We also have 
the problem that players can simply walk into displacements sometimes:( or 
fly into them for that matter from falling.

I created a demo today on one of the tallest maps that source can handleI 
used our bungee to fall to the bottom, slap the rope onto a ropetarget and 
literally Bounceoff the bungee...alll the way back up.ONLY at the very 
bottom of the fall and at the very top of my arcwas the 
DEMOsmooth.the rest was total jittery screen, even tho in game this 
flying bit of ours is perfectly SMOOTH. We cant even make a respectible 
promotion video for the mod without seeing this lag in the movie too, whetehr 
we are jumping, surfing, or this bungee flying action.

My entire ability to allow my community to compete for Records on our maps is 
detroyed because of this bug ruining the demos as well. Not one single demo is 
without lag. Thats half the concept of the game.to compete with each other 
for the fastest time like our CS1.6 faction does. If they cant have smooth 
demos, they wont even start making one. If they have the wall bug stopping 
them, suddenly, from reaching the top, they will never try a demo Record 
attempt again.

Also on demos : Anyone know a way we can control what settings the players have 
with this demos system of HL2? We cant even see if the player is cheating with 
cvars.all this was possible in hl and even really easy :(

In many, many, (over 20 different coding spasms) attempts to match speeds 
between server/client, match anything...it does nothing but make it, usually 10 
times worse, but never once better.

Garry Newman, I hear, bless your soul, somehow solved the moving objects 
problem.this aspect would be the greatest thing for my mod. jump mod with 
no moving objects = 20% less fun. Did he need the engine to solve this? This is 
another serious issue. I read through the hlcoders list today all the way back 
to the day i stopped checking it, and found some fixes that i hope will help 
this. Im wondering if you all really solved the plat problem or func_door 
moving objects.

Fortress Forever achieved HL1 movement quite smoothly. I've had contact with 
him and hopefully sooner or later he can contact his original programmer who 
did that amazing feat. If it works with us what they didoh boy spread the 
word right!! Everyone is actually affected by this.

If anyone else is able to contribute any new (After summer of 2006) SOLID 
information on how to solve this prediction code interpolation problem...server 
client speed mismatching wall

RE: [hlcoders] What is the purpose of the client's server.dll?

2006-12-22 Thread Yahn Bernier
Nah, that's done by the modules which define the ConCommands/ConVars.
Most of the autocomplete ones reside in the engine.dll.  The console
vgui UI stuff is all in gameui.dll.

Yahn


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Thursday, December 21, 2006 11:15 PM
To: hlcoders@list.valvesoftware.com; hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] What is the purpose of the client's server.dll?

I just noticed something else that the client's server.dll is apparently
responsible for: command line auto-completion of command names.

At 2006/11/30 11:15 AM, Yahn Bernier wrote:
Structures in memory exported from the .dll The server defines the
SendPropxxx with the number of bits and ranges, so that's why it has to

be networked or copied down from the server .dll to the client.
The client only connects to those with the RecvProps, which don't
define the network encoding

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, November 29, 2006 8:15 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] What is the purpose of the client's server.dll?

Ok, so it is correct that the actual code is basically unused, and
that's intentional.

What exactly is it checksumming?  The .dll file on disk, or the
structures in memory?

I hope it's not the .dll, since I release server updates for my mod
more frequently than client updates, so the client's server.dlls will
almost always differ from the server's server.dll.

If it's just the structures in memory, it seems like the client.dll
already knows all of the structure sizes, what with all the stuff like
IMPLEMENT_CLIENTCLASS_DT, so I still don't get what the purpose of the
server.dll could be.

(In response to the other email about file sizes - well, reducing
executable size bloat is always a good thing, even if it's just a few
megs.)

At 2006/11/29 09:35 PM, you wrote:
The client uses the class definitions from the server to see if it can

avoid having to request the networked class tables from the remote
host

at signon time. It checksums it's version of the servers and if that
matches what the server sends down, then it just builds its client
side

network setup directly from the server data.  It saves a bunch of
bandwidth.

The system assumes that the client and server .dlls are in sync.

We could probably investigate unloading the server.dll after verifying

the tables and getting what we need, but since we don't call any
methods in it, I think the code would get paged out pretty effectively
anyway.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, November 29, 2006 6:31 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] What is the purpose of the client's server.dll?

I've asked before, but no one seemed to know.  It's been about a year
so I figured I'd try my luck again. :)

What is the purpose of the client's server.dll?  Basically, if I ever
forget to copy over the latest version, then I get weird Valve server

uses different class tables errors.  But the mod code in it seemingly

serves no actual purpose, as I've added large numbers of asserts,
tested on the client, and seen that almost none of the mod code is
ever
called.
So there's this 5 megs or so of unused code, but somewhere in it is a
magic few bytes that causes server uses different class tables
errors.

I would like to trim down the file size more for my mod-downloaders,
but I'm also just curious.

___
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


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



RE: [hlcoders] What is the purpose of the client's server.dll?

2006-11-30 Thread Yahn Bernier
Structures in memory exported from the .dll
The server defines the SendPropxxx with the number of bits and ranges,
so that's why it has to be networked or copied down from the server .dll
to the client.
The client only connects to those with the RecvProps, which don't define
the network encoding

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, November 29, 2006 8:15 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] What is the purpose of the client's server.dll?

Ok, so it is correct that the actual code is basically unused, and
that's intentional.

What exactly is it checksumming?  The .dll file on disk, or the
structures in memory?

I hope it's not the .dll, since I release server updates for my mod more
frequently than client updates, so the client's server.dlls will almost
always differ from the server's server.dll.

If it's just the structures in memory, it seems like the client.dll
already knows all of the structure sizes, what with all the stuff like
IMPLEMENT_CLIENTCLASS_DT, so I still don't get what the purpose of the
server.dll could be.

(In response to the other email about file sizes - well, reducing
executable size bloat is always a good thing, even if it's just a few
megs.)

At 2006/11/29 09:35 PM, you wrote:
The client uses the class definitions from the server to see if it can
avoid having to request the networked class tables from the remote host

at signon time. It checksums it's version of the servers and if that
matches what the server sends down, then it just builds its client side

network setup directly from the server data.  It saves a bunch of
bandwidth.

The system assumes that the client and server .dlls are in sync.

We could probably investigate unloading the server.dll after verifying
the tables and getting what we need, but since we don't call any
methods in it, I think the code would get paged out pretty effectively
anyway.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, November 29, 2006 6:31 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] What is the purpose of the client's server.dll?

I've asked before, but no one seemed to know.  It's been about a year
so I figured I'd try my luck again. :)

What is the purpose of the client's server.dll?  Basically, if I ever
forget to copy over the latest version, then I get weird Valve server
uses different class tables errors.  But the mod code in it seemingly
serves no actual purpose, as I've added large numbers of asserts,
tested on the client, and seen that almost none of the mod code is ever
called.
So there's this 5 megs or so of unused code, but somewhere in it is a
magic few bytes that causes server uses different class tables
errors.

I would like to trim down the file size more for my mod-downloaders,
but I'm also just curious.

___
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] What is the purpose of the client's server.dll?

2006-11-29 Thread Yahn Bernier
The client uses the class definitions from the server to see if it can
avoid having to request the networked class tables from the remote host
at signon time. It checksums it's version of the servers and if that
matches what the server sends down, then it just builds its client side
network setup directly from the server data.  It saves a bunch of
bandwidth.

The system assumes that the client and server .dlls are in sync.

We could probably investigate unloading the server.dll after verifying
the tables and getting what we need, but since we don't call any methods
in it, I think the code would get paged out pretty effectively anyway.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, November 29, 2006 6:31 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] What is the purpose of the client's server.dll?

I've asked before, but no one seemed to know.  It's been about a year so
I figured I'd try my luck again. :)

What is the purpose of the client's server.dll?  Basically, if I ever
forget to copy over the latest version, then I get weird Valve server
uses different class tables errors.  But the mod code in it seemingly
serves no actual purpose, as I've added large numbers of asserts, tested
on the client, and seen that almost none of the mod code is ever called.
So there's this 5 megs or so of unused code, but somewhere in it is a
magic few bytes that causes server uses different class tables errors.

I would like to trim down the file size more for my mod-downloaders, but
I'm also just curious.

___
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] Custom Mouse Cursor

2006-10-06 Thread Yahn Bernier
I added this API to vgui::ISurface here at Valve a while back, it
already be in the latest SDK code.  The API is:

virtual vgui::HCursor   CreateCursorFromFile( char const
*curOrAniFile, char const *pPathID = 0 ) = 0;

Then you can SetCursor the new Hcursor you get back...

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Oliver
Sent: Friday, October 06, 2006 9:45 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Custom Mouse Cursor

--
[ Picked text/plain from multipart/alternative ] I've been working on
this for my mod as well but have run into similar problems as Nick.  Any
ideas or workarounds would be great.

On 10/5/06, Nick Darnell [EMAIL PROTECTED] wrote:

 --
 [ Picked text/plain from multipart/alternative ] And,
 vgui::surface()-LockCursor(); doesn't seem to prevent it either.

 -Nick

 On 10/5/06, Nick Darnell [EMAIL PROTECTED] wrote:
 
  Nope.  I tried calling SetCursor(NULL); in the Tick method of a
 vgui.  The
  best I get is a flickering cursor, jumping between visible and
 not.  Their
  underlying cursor code must be being run every frame, and it just
  keeps resetting the cursor.
 
  -Nick
 
  On 10/4/06, Nick Darnell [EMAIL PROTECTED] wrote:
  
   That's what I was hoping, but I was thinking Source would override

   any cursor I load using...(but ill try it out right now)
  
   *HANDLE* *LoadImage(*
 *HINSTANCE* *hinst**,*
  
 *LPCTSTR* *lpszName**, *
 *UINT* *uType**, *
 *int* *cxDesired**, *
 *int* *cyDesired**, *
 *UINT* *fuLoad *
   *);
  
   *-- or --
  
  
   *
   *HCURSOR LoadCursorFromFile(
  
   LPCTSTR *lpFileName*
   );
  
   -Nick
  
   On 10/4/06, Garry Newman  [EMAIL PROTECTED] wrote:
   
--
[ Picked text/plain from multipart/alternative ] You should be
able to set the cursor the same as any windows
 program.
   
I wouldn't do the drawing a texture method - it makes input feel

really crappy when you're running at under 40 fps.
   
   
   
On 10/4/06, Nick Darnell  [EMAIL PROTECTED] wrote:

 --
 [ Picked text/plain from multipart/alternative ] How would you

 draw the image to properly extend into another
 panels
 drawing
 space?

 -Nick

 On 10/4/06, Justin Krenz [EMAIL PROTECTED]  wrote:
 
  Set it to no cursor, and then use an image as your cursor
  and
reposition
  it at the mouse position every update?
 
  Nick Darnell wrote:
   --
   [ Picked text/plain from multipart/alternative ] Is there
   any chance the public SDK could have the mouse cursor
code
  opened
   up?  I was hoping to have custom mouse cursors in the
vgui.  But, it's
   presenting me with a bit of a dilemma since the actual
   cursor
code
 isn't
  in
   the public SDK.  All I get is the ability to SetCuror()
   using
the
  provided
   enum options for standard cursors.
   -Nick Darnell
   --
  
   ___
   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


--

___
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] from screen to world

2006-10-01 Thread Yahn Bernier
Note that the client .dll can request the last worldToScreen from the
engine through the engine-GetWorldToScreenMatrix API.  You might have
to do this differently if the view model code hoses that matrix, though,
or you could cache the matrix during the rendering of regular entities
and use it later when you need it.

This gives you and origin an direction for what's under the mouse and
then you just trace a ray from that origin in the forward direction and
see what it hits.

Yahn


// x and y are the mouse position relative to the viewport/engine view
which is w wide and h high
void CreatePickingRay( float x, float y, int w, int h, Vector org,
Vector forward, const Vmatrix worldToScreen )
{
// Remap x and y into -1 to 1 normalized space
float xf, yf;
xf = ( 2.0f * x / (float)(w-1) ) - 1.0f;
yf = ( 2.0f * y / (float)(h-1) ) - 1.0f;

// Flip y axis
yf = -yf;

VMatrix screenToWorld;
MatrixInverseGeneral( worldToScreen, screenToWorld );

// Create two points at the normalized mouse x, y pos and at the
near and far z planes (0 and 1 depth)
Vector v1, v2;
v1.Init( xf, yf, 0.0f );
v2.Init( xf, yf, 1.0f );

Vector o2;
// Transform the two points by the screen to world matrix
screenToWorld.V3Mul( v1, org ); // ray start origin
screenToWorld.V3Mul( v2, o2 );  // ray end origin
VectorSubtract( o2, org, forward );
forward.NormalizeInPlace();
}

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Daktor
Sent: Sunday, October 01, 2006 4:26 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] from screen to world

--
[ Picked text/plain from multipart/alternative ] The function
GetVectorInScreenSpace(...) provides a way to go from a vector in the
world to a location on the screen.  Is there any way to do the opposite?
We have a fullscreen transparent panel (with mouse input enabled and
keyboard input disabled) and are trying to determine the world location
of the mouse cursor when the user clicks.
--

___
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] Is this a little bug?

2006-09-11 Thread Yahn Bernier
Yes, definitely a bug

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robbie
Groenewoudt
Sent: Sunday, September 10, 2006 8:59 AM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Is this a little bug?

--
[ Picked text/plain from multipart/alternative ] Check out the function
void Physics_RunThinkFunctions( bool simulating ) in physics_main.cpp.
It has the following code:

for ( int i = 1; i  gpGlobals-maxClients; i++ )
{
CBasePlayer *pPlayer = UTIL_PlayerByIndex( i );
if ( pPlayer )
{
// Always reset clock to real sv.time
gpGlobals-curtime = starttime;
Physics_SimulateEntity( pPlayer );
}
}

Which would mean that this doesn't get called for the last player.

Robbie
--

___
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] Is this a little bug?

2006-09-11 Thread Yahn Bernier
Since players simulate off of CUserCmds it might not be that bad.  But I
found about 15 other instances of this off by one bug in our codebase so
I fixed all of those, too. :)

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeremy
Swigart
Sent: Monday, September 11, 2006 2:10 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Is this a little bug?

--
[ Picked text/plain from multipart/alternative ] Wonder what kind of
craziness the last client would have with those bugs.
Physics_SimulateEntity sounds like a rather important function hehe.

On 9/11/06, Yahn Bernier [EMAIL PROTECTED] wrote:

 Yes, definitely a bug

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Robbie
 Groenewoudt
 Sent: Sunday, September 10, 2006 8:59 AM
 To: hlcoders@list.valvesoftware.com
 Subject: [hlcoders] Is this a little bug?

 --
 [ Picked text/plain from multipart/alternative ] Check out the
 function void Physics_RunThinkFunctions( bool simulating ) in
physics_main.cpp.
 It has the following code:

 for ( int i = 1; i  gpGlobals-maxClients; i++ )
 {
 CBasePlayer *pPlayer = UTIL_PlayerByIndex( i );
 if ( pPlayer )
 {
 // Always reset clock to real sv.time
 gpGlobals-curtime = starttime;
 Physics_SimulateEntity( pPlayer );
 }
 }

 Which would mean that this doesn't get called for the last player.

 Robbie
 --

 ___
 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] VGUI togglebuttons / checkboxes missing in new SDK?

2006-09-04 Thread Yahn Bernier
This is almost certainly a bug caused by a change I made.  It most like
related to some linker funkiness with unused modules being removed at
link time by the compiler.  I'll investigate on our end and post a fix
for you guys when I'm back in the office later this week.  If you look
at the macros, they are supposed to declare a helper variable
(linker_hack or something like that) which should pull in the module no
matter what, but that might be failing to work for some reason and in
that case the new control menu will be missing items that the linker
removed at link time.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ben Everett
Sent: Sunday, September 03, 2006 11:41 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] VGUI togglebuttons / checkboxes missing in new
SDK?

The underlying problem has to do with the CBuildFactoryHelper class and
how the creation of VGUI elements are handled. Right now the macros
DECLARE_BUILD_FACTORY, DECLARE_BUILD_FACTORY_DEFAULT_TEXT,
DECLARE_BUILD_FACTORY_CUSTOM, and DECLARE_BUILD_FACTORY_CUSTOM_ALIAS are
used to declare a static instance of a CBuildFactoryHelper.
CBuildFactoryHelper then has static references to a linked list of
available VGUI elements that can be created. The problem is, not all
constructors for CBuildFactoryHelper are being called (ImagePanel's
being one of them). I've been trying to hunt down the root cause of this
and fix it, but no luck as of yet.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Skillet
Sent: Sunday, September 03, 2006 12:57 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] VGUI togglebuttons / checkboxes missing in new
SDK?

--
[ Picked text/plain from multipart/alternative ] I noticed that
ToggleButtons and (more painfully) ImagePanels don't work after applying
the SDK update.

You can still use IsDepressed(), ForceDepressed() and
RecalculateDepressedState() with buttons, which I was already doing with
my ToggleButtons because they got out of sync otherwise IIRC.

So, any way to continue using the controls that have been removed?  It
seems that they're just ignored in the .res files now.
:\

On 8/8/06, Steve Rabouin [EMAIL PROTECTED] wrote:

 --
 [ Picked text/plain from multipart/alternative ] Am I missing
 something, or those functionalities have been removed in the new SDK?
 When creating a vgui panel those options are not available anymore.
 am I the only one who used those? :o

 I haven't had time to verify the vgui code much, so excuse me if this
 is something simple, but it seems they are missing.
 --

 ___
 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] Weapon Sync and Prediction

2006-08-19 Thread Yahn Bernier
Does your weapon show up in cl_predictionlist?  If not, then your entity
is not being predicted.  If so, then the list should tell you the entity
index to feed into cl_pdump to show the variables of the entity.

Let me know if you still can't see the info.
Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew
(Bromfitsen)
Sent: Saturday, August 19, 2006 4:19 AM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Weapon Sync and Prediction

--
[ Picked text/plain from multipart/alternative ]
I have a couple of issues arrising with our weapons using the From
Scratch
SDK.  The structure of the weapons is similar to the HL2 ones in that
they
are taken from the SDK Base weapon, into sub classes then the acctual
weapons are derived from these.  One of the issues I am having is that
the
Predicted information will not appear in cl_pdump, which makes it
tougher to
debug visually.  Has anyone one run accross this or has knowledge of how
to
add something to the cl_pdump display?  Secondally, I've added another
class
derived from our derived classes, it runs fine, but it the predicted
variables seem to get out of sync and this ends up creating massive
issues.
It seems to be setup properly, it's in the send table, in the prediction
table, just as every other weapon has it set up, ie. BaseCombat weapon
all
the way down to our own classes.  Then in the weapons code it is handled
by
the item post from, pretty much  like this

if( !m_bInSpecial )
{
//Shooting and stuff is handled here
}

if( pPlayer-m_afButtonPressed  IN_SPECIAL )
{
   if( m_flNextPrimaryAttack = gpGlobals-curtime )
   {
   m_bInSpecial = !m_bInSpecial;
   //Handles animations and such
   m_flNextPrimaryAttack = m_flNextSecondaryAttack =
gpGlobals.curtime +
animationLength;
   }
}


It seems simple enough, and follows the structure of all other weapon
calls,
shooting, reloading etc, but at some point the server and client fall
out of
sync, and m_bInSpecial will be true on one side and false on the other.
For
some reason they won't sync up with each other either, even if you keep
switching in and out of special it will always be the opposite, it's as
though the server isn't even sending the value to the client, or the
client
thinks that being the exact logical opposite falls inside tollerances.
A
situation where cl_pdump would be handy.

If anyone has any insights that might help out I'd greatly appreciate
it.
Thanks
--

___
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] Weapon Sync and Prediction

2006-08-19 Thread Yahn Bernier
Hrm, it could just be a layout/font size issue in the cl_pdump panel.
All of the display for that is in the cl_dll so you should be able to
mess with it.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew
(Bromfitsen)
Sent: Saturday, August 19, 2006 10:01 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Weapon Sync and Prediction

--
[ Picked text/plain from multipart/alternative ]
I can see it in the prediction list, and it displays info and vars all
the
way up to the SDKBaseWeapon, we renamed the class and that is reflected
in
the cl_pdump listings.  But the beyond that no more info appears.
--

___
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] Demo Playback

2006-08-16 Thread Yahn Bernier
The only ways I can think this might occur would be 1) you still in fact
have the Alyx EMP tool code files in either your server or client .dll
and are somehow using them, or 2), there's a problem with your client
.dll where the LoadLibrary call from the engine is failing and it's
falling back to the HL2 version of client .dll.  If you run in the dev
studio debugger window, you should see a line showing the full path to
the client .dll (and the server .dll, too).  Double check that it's your
client.dll (and your server.dll) in your mod bin/ folder and not the HL2
client .dll. If your .dll is failing to load, it's usually a crash in
the constructor of a global, stack based object (somethig declared on
the stack in one of your modules).  They're a bit tricky to track
down...

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Meow Mew
Sent: Wednesday, August 16, 2006 10:06 AM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Demo Playback

I was hoping somebody could point me in the right direction for
resolving an
issue we've been having.

We need to record and playback demos, an ability easily used and
implemented
in Halflife 2.  It seems when we try it in our own mod, the recording
reports back as fine, but the playback of the demo won't function.

The error comes with a listing of Valve textures we don't use as
missing,
and more importantly, the DT_AlyxEmpTool data table entry is mismatched
on
the server and client.  This is highly irregular as we've removed Alyx
and
her Emp tool and that data table is not in our codebase.

A listing of the demo information reports the following which I can't
decipher as irregular or not:
Network protocol: 7
Demo version: 2
Server name: localhost:0

How is a data table being imported that is not in our server or client
libraries?  Is it somehow using the hl2 DDLs which are in a completely
different directory chain?  We actually have the engine code liscenced
and
as of yet I see no problems, but it's a very big project.  If it's
somehow
hidden to hardcoded HL2 libraries, I could easily change it if I could
find
out where or how.

_
On the road to retirement? Check out MSN Life Events for advice on how
to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement


___
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] Animation bug in August 04 SDK Code?

2006-08-14 Thread Yahn Bernier
Yeah, I haven't traced through all of the scenarious but like I said our
internal builds have that line removed.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robbie
Groenewoudt
Sent: Monday, August 14, 2006 1:55 AM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Animation bug in August 04 SDK Code?

--
[ Picked text/plain from multipart/alternative ]
Well, it works good here. The animations of the NPCs were jittery and
totaly
not good. When I removed that code, it works fine.

On 8/14/06, [EMAIL PROTECTED]
[EMAIL PROTECTED]
wrote:

 So you confirm the

http://developer.valvesoftware.com/wiki/SDK_Known_Issues_List#Animations
_are_jitteryentry is correct then?

 At 2006/08/08 12:18 PM, Yahn Bernier wrote:
 Yeah, this was changed a couple of ways internally. I think in the
 latest internal code we might have yanked the whole if statement and
 body of code since it wasn't necessary.  There was a bug I recall
where
 if you had it the old way demos would have jittery NPCs but if you
 flipped the ! Then viewmodels would be hosed, but deleting the entire
 thing seemed to fix it.  Something like that.
 
 Yahn
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Paul
Peloski
 Sent: Tuesday, August 08, 2006 3:59 AM
 To: hlcoders@list.valvesoftware.com
 Subject: [hlcoders] Animation bug in August 04 SDK Code?
 
 --
 [ Picked text/plain from multipart/alternative ]
 Hi guys,
 
 I just wanted to point out something that I noticed in the latest SDK
 code,
 in c_baseentity.cpp line 1934 (C_BaseEntity::PreDataUpdate) there is
the
 line
 
 if ( !IsSelfAnimating() )
 
 Which is changed from older code, which doesn't have the !. The
result
 of
 this ! is that entities that DO update m_flAnimTime will not get
their
 animation vars latched and the interpolation of m_flCycle will not
occur
 for
 any entities that use m_flAnimTime (lots of stuff, including players
in
 MP?)
 
 Can anyone confirm that this is a (pretty big) bug and not just my
 mistake?
 --
 
 ___
 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] Animation bug in August 04 SDK Code?

2006-08-08 Thread Yahn Bernier
Yeah, this was changed a couple of ways internally. I think in the
latest internal code we might have yanked the whole if statement and
body of code since it wasn't necessary.  There was a bug I recall where
if you had it the old way demos would have jittery NPCs but if you
flipped the ! Then viewmodels would be hosed, but deleting the entire
thing seemed to fix it.  Something like that.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Peloski
Sent: Tuesday, August 08, 2006 3:59 AM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Animation bug in August 04 SDK Code?

--
[ Picked text/plain from multipart/alternative ]
Hi guys,

I just wanted to point out something that I noticed in the latest SDK
code,
in c_baseentity.cpp line 1934 (C_BaseEntity::PreDataUpdate) there is the
line

if ( !IsSelfAnimating() )

Which is changed from older code, which doesn't have the !. The result
of
this ! is that entities that DO update m_flAnimTime will not get their
animation vars latched and the interpolation of m_flCycle will not occur
for
any entities that use m_flAnimTime (lots of stuff, including players in
MP?)

Can anyone confirm that this is a (pretty big) bug and not just my
mistake?
--

___
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] Localization File

2006-07-18 Thread Yahn Bernier
Do you call vgui::ilocalize()-AddFile( blackoutMOD_%language% );
anywhere in the client .dll?

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron Schiff
Sent: Tuesday, July 18, 2006 5:59 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Localization File

--
[ Picked text/plain from multipart/alternative ]
The mod's folder is called blackoutMOD and I have
resource/blackoutMOD_english.txt but when I use an entry from it on a
label,
it shows up the string name (i.e. #...)

--
ts2do
--

___
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] Localization File

2006-07-18 Thread Yahn Bernier
Specifically, the file must be UNICODE 16 (Notepad.exe can save to this
format) and the line would actually be:

vgui::ilocalize()-AddFile( resource/blackoutMOD_%language%.txt );

The engine will substitute english in place of the %language%
substring.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Yahn Bernier
Sent: Tuesday, July 18, 2006 6:11 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Localization File

Do you call vgui::ilocalize()-AddFile( blackoutMOD_%language% );
anywhere in the client .dll?

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron Schiff
Sent: Tuesday, July 18, 2006 5:59 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Localization File

--
[ Picked text/plain from multipart/alternative ]
The mod's folder is called blackoutMOD and I have
resource/blackoutMOD_english.txt but when I use an entry from it on a
label,
it shows up the string name (i.e. #...)

--
ts2do
--

___
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] Localization File

2006-07-18 Thread Yahn Bernier
Yes, it'll add resource/modname_%language%.txt for you

Let me know if you still can't get it to work.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Aaron Schiff
Sent: Tuesday, July 18, 2006 7:37 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Localization File

--
[ Picked text/plain from multipart/alternative ]
I shouldn't have to call it...as far as I can tell, it's added it by
default
before


--
ts2do
--

___
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] Key Binding

2006-07-10 Thread Yahn Bernier
1.  You could create a full screen panel which is a popup and make it
topmost on the vgui surface
2.  SetCursor(dc_blank)

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John Sheu
Sent: Sunday, July 09, 2006 3:38 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Key Binding

On Tuesday 04 July 2006 12:23 am, John Sheu wrote:
 Referring to cdll_int.h:
  // key trapping (for binding keys)
  virtual voidStartKeyTrapMode( void ) = 0;
  virtual boolCheckDoneKeyTrapping( int buttons, int
key )
= 0;

 So, I suppose that these are used when binding keys.  How do they
work?

Played around with them.  As you might guess, I'm coding a binding
interface.
Still have two issues:

1.  Can't seem to completely trap events; mouse clicks, for example,
still
register on VGUI elements.
2.  How the heck do you hide the cursor?

-John Sheu

___
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] bf_write and unsigned characters

2006-06-03 Thread Yahn Bernier
Is your input string UTF-8 encoded ( looks like char * with high bits ) or 
Unicode 16 (two bytes per character)?

You should be able to do what you are trying to do, but you could always write 
your own version of WriteString that used the WriteBytes API instead and just 
txmit the data as raw binary.  Maybe prepend the # of bytes before the data 
gets put into the buffer.

Looking at bitbuf, there's nothing here which will strip the  128 chars:

void bf_write::WriteChar(int val)
{
WriteSBitLong(val, sizeof(char)  3);
}

bool bf_write::WriteString(const char *pStr)
{
if(pStr)
{
do
{
WriteChar( *pStr );
++pStr;
} while( *(pStr-1) != 0 );
}
else
{
WriteChar( 0 );
}

return !IsOverflowed();
}

Yahn

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James
Sent: Friday, June 02, 2006 11:56 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] bf_write and unsigned characters

--
[ Picked text/plain from multipart/alternative ]
I've been trying to output messages that contain thësê kïñd of chæråchtèrs
to allow for multiple languages in my server plugin. For example, I would
use this code to output a chat area message:
void ChatAreaMsg(int index, char *msg) {
MRecipientFilter filter;
bf_write *buffer;

filter.AddRecipient(index);

buffer =
engine-UserMessageBegin(static_castIRecipientFilter*(filter), 3);
buffer-WriteByte(0);
buffer-WriteString(msg);
buffer-WriteByte(0);
engine-MessageEnd();

return ;
}

However, when I attempt to write out a message that contains characters that
are greater than 128 (unsigned) in byte size, they get stripped. I've also
tried replacing the WriteChar() in the WriteString() function with
WriteByte() but I still get the same result. Is there any way to write these
kind of characters into a bf_write? Or is this problem occurring somewhere
else downstream where these characters may be getting stripped?
--

___
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] assert since new engine update

2006-05-29 Thread Yahn Bernier
WRT:

This is the only place in the SDK where RecvPropArray2 is used, and I'm
currently looking in to just disabling this server-side, since the
whole
CTeam thing looks like a waste of bandwidth.  The player ents already
know what team they're on, so why pointlessly send this same info via
another method?

Note that there is a good reason why you would want a CTeam entity.
Specifically, although the players may contain some of the same data, if
players are out of your PVS you will only have stale data for certain
team members on a team.  You won't have any data for a teammate who
hasn't ever been in your PVS.

The CTeam entity exists to allow getting this data down to the client
independent of PVS.

Yahn


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Sunday, May 28, 2006 2:24 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] assert since new engine update

The following patch fixes the bug by disabling CTeam entirely.  I'll
eventually remove CTeam from my mod, as it doesn't do anything, but for
now here's a backwards-compatible fix.  (Unfortunately the player that
is reporting crashers since the latest Steam update was not helped by
this fix.)


--- mod/src/dlls/team.cpp   2005/06/11 22:14:30 1.2
+++ mod/src/dlls/team.cpp   2006/05/28 21:20:41
@@ -31,8 +31,11 @@

 int SendProxyArrayLength_PlayerArray( const void *pStruct, int objectID
)
 {
-   CTeam *pTeam = (CTeam*)pStruct;
-   return pTeam-m_aPlayers.Count();
+// The RecvPropArray2 in general was seemingly broken in the May
25th-ish core engine update.
+// The CTeam in particular was certainly broken at that time,
however, thankfully it doesn't
+// serve any important purpose.
+// For backwards compatibility with old client, we disable it,
rather than remove it entirely.
+return 0;
 }



At 2006/05/28 04:10 PM, Yahn Bernier wrote:
We'll have someone take a look at this with a debug engine and see what
changed.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Sunday, May 28, 2006 12:53 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] assert since new engine update

This appears to be a bug in the core engine that the SDK has no real
control over.

If I add this extra logging:
To the bottom of SendProxy_PlayerList:
Msg(sending player #%d = ent num %d\n, iElement, pOut-m_Int);

To the bottom of SendProxyArrayLength_PlayerArray:
Msg(sending size %d\n, pTeam-m_aPlayers.Count());

To the top of RecvProxy_PlayerList:
AssertMsg(0, UTIL_VarArgs(got player #%d = ent num %d\n,
pData-m_iElement, pData-m_Value.m_Int));

To the second line of RecvProxyArrayLength_PlayerArray:
AssertMsg(0, UTIL_VarArgs(got %d (had %d) players\n,
currentArrayLength, pTeam-m_aPlayers.Size()));

Then server side on join you get:
sending size 0
sending size 1
sending player #0 = ent num 1

And client side you get:
c_team.cpp (31) : got 0 (had 0) players
c_team.cpp (31) : got 1 (had 0) players
c_team.cpp (21) : got player #1 = ent num 1
utlvector.h (210) : Assertion Failed: IsValidIndex(i)
c_team.cpp (31) : got 0 (had 0) players
c_team.cpp (31) : got 0 (had 0) players

So looks like, as originally suspected, this is a crasher issue.  I
have
had reports from one person running a release build that they're now
seeing crasher on joining a server.  It's possible this is the cause.

This is the only place in the SDK where RecvPropArray2 is used, and I'm
currently looking in to just disabling this server-side, since the
whole
CTeam thing looks like a waste of bandwidth.  The player ents already
know what team they're on, so why pointlessly send this same info via
another method?


At 2006/05/27 04:59 PM, [EMAIL PROTECTED] wrote:
I was just investigating too.  It looks like in release mode there's a
chance of it crashing, but not certain.  More evidence to support my
ongoing theory that Valve never does debug builds. :)

At 2006/05/27 01:13 PM, Jorge Rodriguez wrote:
Tony omega Sergi wrote:
Is anyone else getting an assert about IsValidIndex since the engine
update?
I've made no changes between updates, and now whenever I run, I get
this at
map start: (when first player connects) inline T CUtlVectorT,
A::operator[]( int i ) {
Assert( IsValidIndex(i) );
return Base()[i];
}

On:
void RecvProxy_PlayerList(  const CRecvProxyData *pData, void
*pStruct, void
*pOut ) {
C_Team *pTeam = (C_Team*)pOut;
-- pTeam-m_aPlayers[pData-m_iElement] = pData-m_Value.m_Int;
}

The line marked with the arrow there.
Yes, I get it, but it hasn't crashed anything so I haven't looked
into
it yet.

--
Jorge Vino Rodriguez


___
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

RE: [hlcoders] assert since new engine update

2006-05-29 Thread Yahn Bernier
It really depends on your MOD.  The default CTeam is pretty thin, so you
might be able to roll all of the data into the CPlayerResource object.
They were created to conceptually map onto two different things, where
CPlayerResource was to contain data about players (even for mods with
no team concept) whereas CTeam was to contain data about teams.  If
all you care about is who is on what team, then you could certainly
ditch Cteam and only transmit a team number in the CPlayerResource.  If
you care about other teamwide stats that can't be recomputed just from
per-player data, then you might still nead it.  We expected that team
based mods would derive a subclass from CTeam and add additional
team-specific data to it so that it could be used on the client for the
HUD etc.  YMMV.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, May 29, 2006 12:15 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] assert since new engine update

That's interesting - I checked C_BasePlayer and you're right in that it
falls through to C_BaseEntity which uses the m_iTeamNum, which is only
transmitted to PVS-local entities.

However C_Team stills seems to not serve any useful purpose, because the
easy solution would be to change C_BasePlayer to use
C_PlayerResource::GetTeam, which is what I had previously assumed it
would do anyway.  I was confused, because I knew my scoreboard correctly
identified spectator team changes, and I see it's already using
g_PR-GetTeam correctly, so that would seem to be the way to go.

Correct me if I'm wrong, but in light of the above, C_Team still seems
like a waste of bandwidth?

At 2006/05/29 01:58 PM, Yahn Bernier wrote:
WRT:

This is the only place in the SDK where RecvPropArray2 is used, and
I'm
currently looking in to just disabling this server-side, since the
whole
CTeam thing looks like a waste of bandwidth.  The player ents already
know what team they're on, so why pointlessly send this same info via
another method?

Note that there is a good reason why you would want a CTeam entity.
Specifically, although the players may contain some of the same data,
if
players are out of your PVS you will only have stale data for certain
team members on a team.  You won't have any data for a teammate who
hasn't ever been in your PVS.

The CTeam entity exists to allow getting this data down to the client
independent of PVS.

Yahn


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Sunday, May 28, 2006 2:24 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] assert since new engine update

The following patch fixes the bug by disabling CTeam entirely.  I'll
eventually remove CTeam from my mod, as it doesn't do anything, but for
now here's a backwards-compatible fix.  (Unfortunately the player that
is reporting crashers since the latest Steam update was not helped by
this fix.)


--- mod/src/dlls/team.cpp   2005/06/11 22:14:30 1.2
+++ mod/src/dlls/team.cpp   2006/05/28 21:20:41
@@ -31,8 +31,11 @@

 int SendProxyArrayLength_PlayerArray( const void *pStruct, int
objectID
)
 {
-   CTeam *pTeam = (CTeam*)pStruct;
-   return pTeam-m_aPlayers.Count();
+// The RecvPropArray2 in general was seemingly broken in the May
25th-ish core engine update.
+// The CTeam in particular was certainly broken at that time,
however, thankfully it doesn't
+// serve any important purpose.
+// For backwards compatibility with old client, we disable it,
rather than remove it entirely.
+return 0;
 }



At 2006/05/28 04:10 PM, Yahn Bernier wrote:
We'll have someone take a look at this with a debug engine and see
what
changed.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Sunday, May 28, 2006 12:53 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] assert since new engine update

This appears to be a bug in the core engine that the SDK has no real
control over.

If I add this extra logging:
To the bottom of SendProxy_PlayerList:
Msg(sending player #%d = ent num %d\n, iElement, pOut-m_Int);

To the bottom of SendProxyArrayLength_PlayerArray:
Msg(sending size %d\n, pTeam-m_aPlayers.Count());

To the top of RecvProxy_PlayerList:
AssertMsg(0, UTIL_VarArgs(got player #%d = ent num %d\n,
pData-m_iElement, pData-m_Value.m_Int));

To the second line of RecvProxyArrayLength_PlayerArray:
AssertMsg(0, UTIL_VarArgs(got %d (had %d) players\n,
currentArrayLength, pTeam-m_aPlayers.Size()));

Then server side on join you get:
sending size 0
sending size 1
sending player #0 = ent num 1

And client side you get:
c_team.cpp (31) : got 0 (had 0) players
c_team.cpp (31) : got 1 (had 0) players
c_team.cpp (21) : got player #1 = ent num 1
utlvector.h (210) : Assertion Failed: IsValidIndex(i)
c_team.cpp (31) : got 0 (had 0) players
c_team.cpp (31) : got 0 (had 0) players

RE: [hlcoders] assert since new engine update

2006-05-29 Thread Yahn Bernier
Yup.  You guys have the code, so feel free to squeeze down the
networking overhead where you think it's appropriate for what you are
trying to support.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, May 29, 2006 1:10 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] assert since new engine update

Ok thanks, sounds good.  CTeam does seem appropriate for storing
something like team win counters or whatever, but I still would not want
to waste the bandwidth (even though it should be fairly low) sending the
team associations two different ways, when the client can already figure
that list out from the g_PR.  Now that I think about it, the CTeam thing
is almost identical to this KI entry:

http://developer.valvesoftware.com/wiki/SDK_Known_Issues_List#Server:_Th
e_client.27s_health_variable_is_pointlessly_sent_across_the_wire_twice.

At 2006/05/29 02:39 PM, Yahn Bernier wrote:
It really depends on your MOD.  The default CTeam is pretty thin, so
you
might be able to roll all of the data into the CPlayerResource object.
They were created to conceptually map onto two different things, where
CPlayerResource was to contain data about players (even for mods with
no team concept) whereas CTeam was to contain data about teams.  If
all you care about is who is on what team, then you could certainly
ditch Cteam and only transmit a team number in the CPlayerResource.  If
you care about other teamwide stats that can't be recomputed just from
per-player data, then you might still nead it.  We expected that team
based mods would derive a subclass from CTeam and add additional
team-specific data to it so that it could be used on the client for the
HUD etc.  YMMV.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, May 29, 2006 12:15 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] assert since new engine update

That's interesting - I checked C_BasePlayer and you're right in that it
falls through to C_BaseEntity which uses the m_iTeamNum, which is only
transmitted to PVS-local entities.

However C_Team stills seems to not serve any useful purpose, because
the
easy solution would be to change C_BasePlayer to use
C_PlayerResource::GetTeam, which is what I had previously assumed it
would do anyway.  I was confused, because I knew my scoreboard
correctly
identified spectator team changes, and I see it's already using
g_PR-GetTeam correctly, so that would seem to be the way to go.

Correct me if I'm wrong, but in light of the above, C_Team still seems
like a waste of bandwidth?

At 2006/05/29 01:58 PM, Yahn Bernier wrote:
WRT:

This is the only place in the SDK where RecvPropArray2 is used, and
I'm
currently looking in to just disabling this server-side, since the
whole
CTeam thing looks like a waste of bandwidth.  The player ents already
know what team they're on, so why pointlessly send this same info via
another method?

Note that there is a good reason why you would want a CTeam entity.
Specifically, although the players may contain some of the same data,
if
players are out of your PVS you will only have stale data for certain
team members on a team.  You won't have any data for a teammate who
hasn't ever been in your PVS.

The CTeam entity exists to allow getting this data down to the client
independent of PVS.

Yahn


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Sunday, May 28, 2006 2:24 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] assert since new engine update

The following patch fixes the bug by disabling CTeam entirely.  I'll
eventually remove CTeam from my mod, as it doesn't do anything, but
for
now here's a backwards-compatible fix.  (Unfortunately the player that
is reporting crashers since the latest Steam update was not helped by
this fix.)


--- mod/src/dlls/team.cpp   2005/06/11 22:14:30 1.2
+++ mod/src/dlls/team.cpp   2006/05/28 21:20:41
@@ -31,8 +31,11 @@

 int SendProxyArrayLength_PlayerArray( const void *pStruct, int
objectID
)
 {
-   CTeam *pTeam = (CTeam*)pStruct;
-   return pTeam-m_aPlayers.Count();
+// The RecvPropArray2 in general was seemingly broken in the May
25th-ish core engine update.
+// The CTeam in particular was certainly broken at that time,
however, thankfully it doesn't
+// serve any important purpose.
+// For backwards compatibility with old client, we disable it,
rather than remove it entirely.
+return 0;
 }



At 2006/05/28 04:10 PM, Yahn Bernier wrote:
We'll have someone take a look at this with a debug engine and see
what
changed.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Sunday, May 28, 2006 12:53 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] assert since new engine update

This appears

RE: [hlcoders] assert since new engine update

2006-05-29 Thread Yahn Bernier
Okay, I found and fixed this issue.  An internal data structure was
expanded and the engine.dll was rebuilt against the updated data
structure.  However, the MOD headers don't reflect the change nor would
unrecompiled MODs which would assume the old data layout.  I reverted
the structure to the old version since the change wasn't necessary going
forward.  We will roll out a new engine update with the fix for this
issue shortly.  And yes, this bug would have lead to MOD crashes when
using this version of the engine.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Sunday, May 28, 2006 2:24 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] assert since new engine update

The following patch fixes the bug by disabling CTeam entirely.  I'll
eventually remove CTeam from my mod, as it doesn't do anything, but for
now here's a backwards-compatible fix.  (Unfortunately the player that
is reporting crashers since the latest Steam update was not helped by
this fix.)


--- mod/src/dlls/team.cpp   2005/06/11 22:14:30 1.2
+++ mod/src/dlls/team.cpp   2006/05/28 21:20:41
@@ -31,8 +31,11 @@

 int SendProxyArrayLength_PlayerArray( const void *pStruct, int objectID
)
 {
-   CTeam *pTeam = (CTeam*)pStruct;
-   return pTeam-m_aPlayers.Count();
+// The RecvPropArray2 in general was seemingly broken in the May
25th-ish core engine update.
+// The CTeam in particular was certainly broken at that time,
however, thankfully it doesn't
+// serve any important purpose.
+// For backwards compatibility with old client, we disable it,
rather than remove it entirely.
+return 0;
 }



At 2006/05/28 04:10 PM, Yahn Bernier wrote:
We'll have someone take a look at this with a debug engine and see what
changed.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Sunday, May 28, 2006 12:53 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] assert since new engine update

This appears to be a bug in the core engine that the SDK has no real
control over.

If I add this extra logging:
To the bottom of SendProxy_PlayerList:
Msg(sending player #%d = ent num %d\n, iElement, pOut-m_Int);

To the bottom of SendProxyArrayLength_PlayerArray:
Msg(sending size %d\n, pTeam-m_aPlayers.Count());

To the top of RecvProxy_PlayerList:
AssertMsg(0, UTIL_VarArgs(got player #%d = ent num %d\n,
pData-m_iElement, pData-m_Value.m_Int));

To the second line of RecvProxyArrayLength_PlayerArray:
AssertMsg(0, UTIL_VarArgs(got %d (had %d) players\n,
currentArrayLength, pTeam-m_aPlayers.Size()));

Then server side on join you get:
sending size 0
sending size 1
sending player #0 = ent num 1

And client side you get:
c_team.cpp (31) : got 0 (had 0) players
c_team.cpp (31) : got 1 (had 0) players
c_team.cpp (21) : got player #1 = ent num 1
utlvector.h (210) : Assertion Failed: IsValidIndex(i)
c_team.cpp (31) : got 0 (had 0) players
c_team.cpp (31) : got 0 (had 0) players

So looks like, as originally suspected, this is a crasher issue.  I
have
had reports from one person running a release build that they're now
seeing crasher on joining a server.  It's possible this is the cause.

This is the only place in the SDK where RecvPropArray2 is used, and I'm
currently looking in to just disabling this server-side, since the
whole
CTeam thing looks like a waste of bandwidth.  The player ents already
know what team they're on, so why pointlessly send this same info via
another method?


At 2006/05/27 04:59 PM, [EMAIL PROTECTED] wrote:
I was just investigating too.  It looks like in release mode there's a
chance of it crashing, but not certain.  More evidence to support my
ongoing theory that Valve never does debug builds. :)

At 2006/05/27 01:13 PM, Jorge Rodriguez wrote:
Tony omega Sergi wrote:
Is anyone else getting an assert about IsValidIndex since the engine
update?
I've made no changes between updates, and now whenever I run, I get
this at
map start: (when first player connects) inline T CUtlVectorT,
A::operator[]( int i ) {
Assert( IsValidIndex(i) );
return Base()[i];
}

On:
void RecvProxy_PlayerList(  const CRecvProxyData *pData, void
*pStruct, void
*pOut ) {
C_Team *pTeam = (C_Team*)pOut;
-- pTeam-m_aPlayers[pData-m_iElement] = pData-m_Value.m_Int;
}

The line marked with the arrow there.
Yes, I get it, but it hasn't crashed anything so I haven't looked
into
it yet.

--
Jorge Vino Rodriguez


___
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

RE: [hlcoders] assert since new engine update

2006-05-28 Thread Yahn Bernier
We'll have someone take a look at this with a debug engine and see what
changed.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Sunday, May 28, 2006 12:53 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] assert since new engine update

This appears to be a bug in the core engine that the SDK has no real
control over.

If I add this extra logging:
To the bottom of SendProxy_PlayerList:
Msg(sending player #%d = ent num %d\n, iElement, pOut-m_Int);

To the bottom of SendProxyArrayLength_PlayerArray:
Msg(sending size %d\n, pTeam-m_aPlayers.Count());

To the top of RecvProxy_PlayerList:
AssertMsg(0, UTIL_VarArgs(got player #%d = ent num %d\n,
pData-m_iElement, pData-m_Value.m_Int));

To the second line of RecvProxyArrayLength_PlayerArray:
AssertMsg(0, UTIL_VarArgs(got %d (had %d) players\n,
currentArrayLength, pTeam-m_aPlayers.Size()));

Then server side on join you get:
sending size 0
sending size 1
sending player #0 = ent num 1

And client side you get:
c_team.cpp (31) : got 0 (had 0) players
c_team.cpp (31) : got 1 (had 0) players
c_team.cpp (21) : got player #1 = ent num 1
utlvector.h (210) : Assertion Failed: IsValidIndex(i)
c_team.cpp (31) : got 0 (had 0) players
c_team.cpp (31) : got 0 (had 0) players

So looks like, as originally suspected, this is a crasher issue.  I have
had reports from one person running a release build that they're now
seeing crasher on joining a server.  It's possible this is the cause.

This is the only place in the SDK where RecvPropArray2 is used, and I'm
currently looking in to just disabling this server-side, since the whole
CTeam thing looks like a waste of bandwidth.  The player ents already
know what team they're on, so why pointlessly send this same info via
another method?


At 2006/05/27 04:59 PM, [EMAIL PROTECTED] wrote:
I was just investigating too.  It looks like in release mode there's a
chance of it crashing, but not certain.  More evidence to support my
ongoing theory that Valve never does debug builds. :)

At 2006/05/27 01:13 PM, Jorge Rodriguez wrote:
Tony omega Sergi wrote:
Is anyone else getting an assert about IsValidIndex since the engine
update?
I've made no changes between updates, and now whenever I run, I get
this at
map start: (when first player connects) inline T CUtlVectorT,
A::operator[]( int i ) {
Assert( IsValidIndex(i) );
return Base()[i];
}

On:
void RecvProxy_PlayerList(  const CRecvProxyData *pData, void
*pStruct, void
*pOut ) {
C_Team *pTeam = (C_Team*)pOut;
-- pTeam-m_aPlayers[pData-m_iElement] = pData-m_Value.m_Int;
}

The line marked with the arrow there.
Yes, I get it, but it hasn't crashed anything so I haven't looked into
it yet.

--
Jorge Vino Rodriguez


___
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] Free Sound List Is Full

2006-05-25 Thread Yahn Bernier
I would instrument CSoundEnt::InsertSound and print out all of the
sounds being created and all of the sounds being freed in FreeSound and
see where you are maxxing it out or leaking entries...

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jay C.
Sent: Thursday, May 25, 2006 4:57 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Free Sound List Is Full

Free Sound List is full!
Could not AllocSound() for InsertSound() (DLL)

It prints that EVERY time someone shoots a bullet, and I don't emit any
new
sounds when anyone shoots. WTF?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:hlcoders-
 [EMAIL PROTECTED] On Behalf Of Jay C.
 Sent: 24 May 2006 02:40
 To: hlcoders@list.valvesoftware.com
 Subject: RE: [hlcoders] Free Sound List Is Full

 The log line is logged once almost any single plugin available is
added, I
 am not making a plugin to remove a log line which is pointless anyway.
 That's Valves job.

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:hlcoders-
  [EMAIL PROTECTED] On Behalf Of Tony omega Sergi
  Sent: 24 May 2006 00:29
  To: hlcoders@list.valvesoftware.com
  Subject: RE: [hlcoders] Free Sound List Is Full
 
  Could you not hook CSoundEnt, and make it remove itself when it's
 created?
  Or make it so your plugin overrides it
 
 
 
  --
  -- omega
  Heroes of Excelsior
  http://www.heroesofexcelsior.com
  Blackened Interactive
  http://www.blackened-interactive.com
  -Original Message-
  From: Jay C. [mailto:[EMAIL PROTECTED]
  Sent: May 23, 2006 7:12 PM
  To: hlcoders@list.valvesoftware.com
  Subject: RE: [hlcoders] Free Sound List Is Full
 
  Can't remove the message from the compiled CS:S or DOD:S binaries,
but
  that's why I emailed, Valve can do it :\
  Can't remove the sound ent because it happens when you add any ONE
of a
  number of plugins.
 
  - Jay
 
 
  ___
  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] Free Sound List Is Full

2006-05-25 Thread Yahn Bernier
Sorry, I missed the first part of this.  Which of our games has the bug
and what's the general repro case?

It is probably benign since the MP games don't have too many AI's which
would rely on being able to hear sounds to do their thinking.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jay C.
Sent: Thursday, May 25, 2006 10:19 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] Free Sound List Is Full

But it's not up to me to do this for every single plug-in available.
This
log is spammed no matter who's plug-in is running on a server.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:hlcoders-
 [EMAIL PROTECTED] On Behalf Of Yahn Bernier
 Sent: 25 May 2006 16:40
 To: hlcoders@list.valvesoftware.com
 Subject: RE: [hlcoders] Free Sound List Is Full

 I would instrument CSoundEnt::InsertSound and print out all of the
 sounds being created and all of the sounds being freed in FreeSound
and
 see where you are maxxing it out or leaking entries...

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Jay C.
 Sent: Thursday, May 25, 2006 4:57 AM
 To: hlcoders@list.valvesoftware.com
 Subject: RE: [hlcoders] Free Sound List Is Full

 Free Sound List is full!
 Could not AllocSound() for InsertSound() (DLL)

 It prints that EVERY time someone shoots a bullet, and I don't emit
any
 new
 sounds when anyone shoots. WTF?

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:hlcoders-
  [EMAIL PROTECTED] On Behalf Of Jay C.
  Sent: 24 May 2006 02:40
  To: hlcoders@list.valvesoftware.com
  Subject: RE: [hlcoders] Free Sound List Is Full
 
  The log line is logged once almost any single plugin available is
 added, I
  am not making a plugin to remove a log line which is pointless
anyway.
  That's Valves job.
 
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:hlcoders-
   [EMAIL PROTECTED] On Behalf Of Tony omega Sergi
   Sent: 24 May 2006 00:29
   To: hlcoders@list.valvesoftware.com
   Subject: RE: [hlcoders] Free Sound List Is Full
  
   Could you not hook CSoundEnt, and make it remove itself when it's
  created?
   Or make it so your plugin overrides it
  
  
  
   --
   -- omega
   Heroes of Excelsior
   http://www.heroesofexcelsior.com
   Blackened Interactive
   http://www.blackened-interactive.com
   -Original Message-
   From: Jay C. [mailto:[EMAIL PROTECTED]
   Sent: May 23, 2006 7:12 PM
   To: hlcoders@list.valvesoftware.com
   Subject: RE: [hlcoders] Free Sound List Is Full
  
   Can't remove the message from the compiled CS:S or DOD:S binaries,
 but
   that's why I emailed, Valve can do it :\
   Can't remove the sound ent because it happens when you add any ONE
 of a
   number of plugins.
  
   - Jay
  
  
   ___
   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


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



RE: [hlcoders] Viewmodel skipping animation saga - continued

2006-05-23 Thread Yahn Bernier
Have you tried putting a memory breakpoing on the address of the
viewmodels m_flCycle variable?

You need to figure out what piece of code is changing the value, e.g.,
is it the networking system, the prediction system, or some other code.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jonathan
Murphy
Sent: Friday, May 12, 2006 2:23 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Viewmodel skipping animation saga - continued

--
[ Picked text/plain from multipart/alternative ]
Well I tried to remove the network sending on both AnimTime and Cycle
(Matthew said he already tried this but I wanted to see for myself). I
also
modified CBaseViewModel::SendViewModelMatchingSequence to set
m_nSequence
(with SetSequence) and flCycle only on the client (to GetCycle() + 0.1f
)
but otherwise left the function unchanged as m_flAnimTime was already
being
set on the client. I also forced client side animation on for the server
and
client.

This resulted in animations barely beginning to be played before being
stopped and no changes to m_flCycle (using cl_pdump). Could this
possibly be
because m_nSequence is still being sent over to the client via the
network
table? I noticed that the Player stops this from beng sent but I don't
see
the point as it won't modify flCycle or flAnimTime.

Any thoughts?

On 5/12/06, Alex Thomson [EMAIL PROTECTED] wrote:

 Two possible solutions:

 1. The client should be correctly predicting these values, so that
when
 the update from the server arrives it's more-or-less the same value.
 Skips/jerks will only happen when the client mis-predicts.
Unfortunately
 the prediction code can be a bit tricky to get your head around...

 2. There's a function UseClientSideAnimation. If you call this on
the
 server copy of your entity, and include these lines in the server
 netclass table
 SendPropExclude( DT_ServerAnimationData , m_flCycle ),
 SendPropExclude( DT_AnimTimeMustBeFirst , m_flAnimTime ),
 Then the cycle  anim time won't be transmitted across the network.

 You'll have to manually set the variables on the client instead using
 SetCycle, SetSequence and so forth, e.g.
 SetSequence( LookupSequence(anim_idle) );
 SetCycle( GetCycle() + 0.1f );


 Hope that helps. Good luck !

 Alex

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto: [EMAIL PROTECTED] On Behalf Of
 NuclearFriend
 Sent: 09 May 2006 05:44
 To: hlcoders@list.valvesoftware.com
 Subject: Re: [hlcoders] Viewmodel skipping animation saga - continued

 --
 [ Picked text/plain from multipart/alternative ]
 On 1/16/06, Matthew Lewis [EMAIL PROTECTED] wrote:
 
  This is a very old problem -- One to which no solution has yet been
  found. The problem is with the viewmodel skipping and jerking in its
  animation playback. I traced the problem to the server and client
  fighting over m_flCycle, m_nSequence, m_flAnimTime, m_flPlaybackRate
  networked variables. In particular, the client sets these variables
 and
  then a short time later (lag time) the server also sets these
 variables
  since they are networked. The result is an animation skip/jerk.
 
  The obvious fix is to block the server from changing the value of
 these
  variables and let the client do the viewmodel animation
independantly
  from the server. However, this is proving exceedingly difficult to
do.
 I
  changed the viewmodel class's send table as follows:
 
  IMPLEMENT_SERVERCLASS_ST_NOBASE(CBaseViewModel, DT_BaseViewModel)
  SendPropModelIndex(SENDINFO(m_nModelIndex)),
  SendPropInt (SENDINFO(m_nBody), 8),
  SendPropInt (SENDINFO(m_nSkin), 10),
  // SendPropInt (SENDINFO(m_nSequence), 8, SPROP_UNSIGNED),
  SendPropInt (SENDINFO(m_nViewModelIndex), VIEWMODEL_INDEX_BITS,
  SPROP_UNSIGNED),
  // SendPropFloat (SENDINFO(m_flPlaybackRate), 8, SPROP_ROUNDUP, -
4.0,
  12.0f),
  SendPropInt (SENDINFO(m_fEffects), 10, SPROP_UNSIGNED),
  // SendPropInt (SENDINFO(m_nAnimationParity), 3, SPROP_UNSIGNED ),
  SendPropEHandle (SENDINFO(m_hWeapon)),
  SendPropEHandle (SENDINFO(m_hOwner)),
 
  // SendPropInt( SENDINFO( m_nNewSequenceParity ), EF_PARITY_BITS,
  SPROP_UNSIGNED ),
  SendPropInt( SENDINFO( m_nResetEventsParity ), EF_PARITY_BITS,
  SPROP_UNSIGNED ),
  SendPropInt( SENDINFO( m_nMuzzleFlashParity ), EF_MUZZLEFLASH_BITS,
  SPROP_UNSIGNED ),
  END_SEND_TABLE()
 
  As I understand the SDK docs, the ST_NOBASE should prevent the base
  class variables (namely m_flCycle, m_flSequence, etc. from
  CBaseAnimating) from being sent to the client. However, what I'm
 finding
  is that they are still get transmitted. I also tried
 |SendPropExclude(...)
  on the variables, but they are still getting sent to the viewmodel.
 The
  only way I found to stop the server from screwing with the viewmodel
 was
  to go into the CBaseAnimating class and strip m_flCycle,
m_nSequence,
  etc. completely from the network variables list and remove the
  prediction completely. Arrgh.
 
  There has to be 

RE: [hlcoders] gpGlobals-realtime standing still

2006-04-17 Thread Yahn Bernier
Yes.  Curtime is the server's clock, which is bounded by the tick
interval and smoothly increases in each call to GameFrame.  If the
actuall time for a frame takes longer than one tick interval, then you
can have multiple calls to GameFrame (with advancing curtime) but only
get a single update to gpGlobals-realtime.  If you need sub-frame clock
accuracy (only useful for perf. Analysis really), then use
Plat_FloatTime() which is independent of gpGlobals-realtime and
-curtime.  Otherwise, if you need a clock, -curtime is good enough,
but does reset between levels.  gpGlobals-realtime does not, but,
again, it only gets advanced at the start of a frame (as opposed to each
tick).

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, April 17, 2006 8:16 PM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] gpGlobals-realtime standing still

Thanks much.  When you say curtime will reflect the 0.015 increments
per tick, it sounds like you're saying that realtime is broken in this
regard and I should use curtime instead?  That's ok, but please confirm,
as I will need to do a lot of search and replace.

I've run a few tests and curtime always seems consistent and monotonic,
however it seems that curtime doesn't start moving until the map loads,
and is reset on map load.  Is that the expected behavior?

-bk

At 2006/04/13 12:33 PM, Yahn Bernier wrote:
gpGlobals-curtime will reflect the 0.015 increments per tick.
Plat_FloatTime() will resample the high perf clock.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jay Stelly
Sent: Thursday, April 13, 2006 10:21 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] gpGlobals-realtime standing still

Yahn found this one - realtime is only integrated once per sever frame.
Game frame is called once per server tick.  When you run something that
uses 100% CPU the server gets starved, then tries to make up the time
all in one frame.  It's a little more complex than that because there's
a cap on the sim time it will try to execute in one frame, but ignoring
that:

The first GameFrame() has the complete update to realtime, then the
subsequent calls don't change because you're still running ticks to
catch up.

So in this example:
 odd realtime 11168195898843186 105.437195 105.486000 0.015000
 odd realtime 11168195901330214 105.486000 105.486000 0.015000
 odd realtime 1116819590426 105.486000 105.486000 0.015000

Frame 2 has a 49ms jump in realtime, and frame 3 has the realtime the
same because each tick is 15 ms, so you need to run multiple ticks to
catch up.

We can change it to make it more incremental, but you're not actually
losing any time (at least I can't see any in this data).

Jay


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 [EMAIL PROTECTED]
 Sent: Wednesday, April 12, 2006 9:06 PM
 To: hlcoders@list.valvesoftware.com
 Subject: RE: [hlcoders] gpGlobals-realtime standing still

 Oh yea forgot to say it's an intel p4 single proc with HT enabled.

 Here's one that repeated 6 times lasting 5 ms...

 odd realtime 11172032919604142 1479.026855 1479.368408 0.015000
 odd realtime 11172032923627014 1479.368408 1479.368408 0.015000
 odd realtime 11172032926027614 1479.368408 1479.368408 0.015000
 odd realtime 11172032930865690 1479.368408 1479.368408 0.015000
 odd realtime 11172032932857506 1479.368408 1479.368408 0.015000
 odd realtime 11172032936032430 1479.368408 1479.368408 0.015000
 odd realtime 11172032937616626 1479.368408 1479.368408 0.015000

 At 2006/04/12 10:45 PM, [EMAIL PROTECTED] wrote:
 Using the 100% cpu method that always breaks rather easily,
 I get results as follows, from the code below.  It usually
 occurs in groups of 2 or 3.  The long-term slowdown may take
 several days to repro again.  In this case you see realtime
 being frozen for 2 milliseconds, calling GameFrame 3 times
 with the same value:
 
 odd realtime 11168195898843186 105.437195 105.486000 0.015000
 odd realtime 11168195901330214 105.486000 105.486000 0.015000
 odd realtime 1116819590426 105.486000 105.486000 0.015000
 
 -
 
 void CServerGameDLL::GameFrame( bool simulating )
 {
 #if defined(DEBUG)
 static float last_realtime = 0;
 if (
(gpGlobals-realtime - last_realtime 
 gpGlobals-frametime / 3)
 || (gpGlobals-realtime - last_realtime 
 gpGlobals-frametime * 3)
 ) {
 LARGE_INTEGER PerformanceCount;
 assert(QueryPerformanceCounter(PerformanceCount));
 Msg(odd realtime %I64d %f %f %f\n,
 PerformanceCount, last_realtime, gpGlobals-realtime,
 gpGlobals-frametime);
 }
 assert(gpGlobals-frametime = 0.0);
 assert(gpGlobals-frametime  .03);
 last_realtime = gpGlobals-realtime;
 #endif
 
 At 2006/04/12 12:14 PM, Jay Stelly wrote:
 The master game clock is driven by
 QueryPerformanceCounter() on win32
 and gettimeofday() on linux

RE: [hlcoders] gpGlobals-realtime standing still

2006-04-13 Thread Yahn Bernier
gpGlobals-curtime will reflect the 0.015 increments per tick.
Plat_FloatTime() will resample the high perf clock.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jay Stelly
Sent: Thursday, April 13, 2006 10:21 AM
To: hlcoders@list.valvesoftware.com
Subject: RE: [hlcoders] gpGlobals-realtime standing still

Yahn found this one - realtime is only integrated once per sever frame.
Game frame is called once per server tick.  When you run something that
uses 100% CPU the server gets starved, then tries to make up the time
all in one frame.  It's a little more complex than that because there's
a cap on the sim time it will try to execute in one frame, but ignoring
that:

The first GameFrame() has the complete update to realtime, then the
subsequent calls don't change because you're still running ticks to
catch up.

So in this example:
 odd realtime 11168195898843186 105.437195 105.486000 0.015000
 odd realtime 11168195901330214 105.486000 105.486000 0.015000
 odd realtime 1116819590426 105.486000 105.486000 0.015000

Frame 2 has a 49ms jump in realtime, and frame 3 has the realtime the
same because each tick is 15 ms, so you need to run multiple ticks to
catch up.

We can change it to make it more incremental, but you're not actually
losing any time (at least I can't see any in this data).

Jay


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of
 [EMAIL PROTECTED]
 Sent: Wednesday, April 12, 2006 9:06 PM
 To: hlcoders@list.valvesoftware.com
 Subject: RE: [hlcoders] gpGlobals-realtime standing still

 Oh yea forgot to say it's an intel p4 single proc with HT enabled.

 Here's one that repeated 6 times lasting 5 ms...

 odd realtime 11172032919604142 1479.026855 1479.368408 0.015000
 odd realtime 11172032923627014 1479.368408 1479.368408 0.015000
 odd realtime 11172032926027614 1479.368408 1479.368408 0.015000
 odd realtime 11172032930865690 1479.368408 1479.368408 0.015000
 odd realtime 11172032932857506 1479.368408 1479.368408 0.015000
 odd realtime 11172032936032430 1479.368408 1479.368408 0.015000
 odd realtime 11172032937616626 1479.368408 1479.368408 0.015000

 At 2006/04/12 10:45 PM, [EMAIL PROTECTED] wrote:
 Using the 100% cpu method that always breaks rather easily,
 I get results as follows, from the code below.  It usually
 occurs in groups of 2 or 3.  The long-term slowdown may take
 several days to repro again.  In this case you see realtime
 being frozen for 2 milliseconds, calling GameFrame 3 times
 with the same value:
 
 odd realtime 11168195898843186 105.437195 105.486000 0.015000
 odd realtime 11168195901330214 105.486000 105.486000 0.015000
 odd realtime 1116819590426 105.486000 105.486000 0.015000
 
 -
 
 void CServerGameDLL::GameFrame( bool simulating )
 {
 #if defined(DEBUG)
 static float last_realtime = 0;
 if (
(gpGlobals-realtime - last_realtime 
 gpGlobals-frametime / 3)
 || (gpGlobals-realtime - last_realtime 
 gpGlobals-frametime * 3)
 ) {
 LARGE_INTEGER PerformanceCount;
 assert(QueryPerformanceCounter(PerformanceCount));
 Msg(odd realtime %I64d %f %f %f\n,
 PerformanceCount, last_realtime, gpGlobals-realtime,
 gpGlobals-frametime);
 }
 assert(gpGlobals-frametime = 0.0);
 assert(gpGlobals-frametime  .03);
 last_realtime = gpGlobals-realtime;
 #endif
 
 At 2006/04/12 12:14 PM, Jay Stelly wrote:
 The master game clock is driven by
 QueryPerformanceCounter() on win32
 and gettimeofday() on linux.
 
 Still, we have had reports of clock issues with QPC() (not this
 particular issue however) on AMD x2 systems that were fixed
 by forcing
 affinity.  Also, for winxp/xp64 there is a chipset driver
 update that
 AMD recommends installing to address some timing issues.  I
 don't have
 the info from AMD handy, but someone has written about it here (and
 provides links to downloads):
 http://ucguides.savagehelp.com/Quake4/FAQ_DualCore.htm#AMD
 
 RDTSC is used for the +showbudget panel.  There are some issues with
 that on AMD x2 systems, but that is limited to the profiling code.
 
 Jay
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of
  Jeffrey botman Broome
  Sent: Wednesday, April 12, 2006 6:36 AM
  To: hlcoders@list.valvesoftware.com
  Subject: Re: [hlcoders] gpGlobals-realtime standing still
 
  Jay Stelly wrote:
   What platform? (linux/win32)?  On linux realtime is just
  accumulating
   changes from repeated calls to gettimeofday() Have you compared
   gpGlobals-realtime to the output of Plat_FloatTime() ?
  Are they both
   slow/stopped or just realtime?
  
   Has anyone else encountered this problem?
 
  ...also, what CPU (Intel or AMD)?  Are you running multiple
  cores and/or CPUs?  I remember recently reading about an AMD
  problem with multiple cores (or was it multiple CPUs) where
  the RDTSC instruction's time wasn't syncronized between
  CPUs/cores so when 

RE: [hlcoders] Client dll not being used

2006-03-29 Thread Yahn Bernier
Right, my guess would be you have a global constructor that is causing a
.gpf and so LoadLibrary itself is failing.

There are ways to debug this (you can write a simple app which
LoadLibrary's your client .dll and see what the error code/message is),
including rolling back to a last known good state and examining all of
your changes carefully.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, March 29, 2006 4:22 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Client dll not being used

This is the same bug in the srcds core, unfortunately.  In fact Valve
probably copied the Quake 2 code directly because Quake 2 had this exact
same annoying bug of failing to report dll load issues and continuing.
That was the first thing I fixed when they open sourced it. :)

Try http://www.dependencywalker.com/ to see if your dll is even
trivially loadable.

At 2006/03/29 03:20 PM, Greg Chadwick wrote:
For some reason HL2 refuses to load my client.dll.  It just defaults to
using the HL2DM one.  It just stopped working at some point and I'm not
entirely sure why.

I've tried putting a breakpoint on the CreateInterface function as well
as the CHLClient::Init function to see if the dll is getting loaded,
and
returning an error code or something when Source tries to intialize it
and thus the HL2DM one is used instead but neither of these functions
seemed to be called.  I also ran filemon from SysInternals.com while I
loaded up the mod and that shows that my client.dll is opened but it
doesn't show any read operations.  It does show a query operation which
may be taking a look at the DLL exports or possibly just checking the
size I'm not sure.  After than it then shows a whole load of read
activity for the HL2DM client.dll file.

So it appears HL2 takes a look at my client.dll decides it doesn't like
it before running any code within it and then uses the HL2DM client.dll
instead.  The question is why?

Has anyone encountered this before?  I do remember this happening to me
one time but IIRC a rebuild fixed it or it went away of its own accord
which doesn't seem to be happening this time.

___
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] Sound downloads.

2006-03-20 Thread Yahn Bernier
It's a bug, we have a fix.  I'll find out when it's scheduled to ship
out to the public release.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jay C.
Sent: Monday, March 20, 2006 3:53 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Sound downloads.

I'm just wondering is there a status on the sound download bug?

It has been reported a few times, you know, the one where sounds don't
work
on the map on which they were downloaded, you have to restart your
client
for them to work.

Is this actually a bug or one of the new features?


___
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] Sound downloads.

2006-03-20 Thread Yahn Bernier
Unfortunately it required changes to the file system and the engine so
it's not on the immediate slate for release.  It's definitely in the
pipeline for release though.  No definite ETA, but hopefully in the next
couple of months.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Brandon
Sent: Monday, March 20, 2006 5:54 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] Sound downloads.

--
[ Picked text/plain from multipart/alternative ]
Omg so you guys are going to fix it!  Release it!!!

On 3/20/06, Yahn Bernier [EMAIL PROTECTED] wrote:

 It's a bug, we have a fix.  I'll find out when it's scheduled to ship
 out to the public release.

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Jay C.
 Sent: Monday, March 20, 2006 3:53 PM
 To: hlcoders@list.valvesoftware.com
 Subject: [hlcoders] Sound downloads.

 I'm just wondering is there a status on the sound download bug?

 It has been reported a few times, you know, the one where sounds don't
 work
 on the map on which they were downloaded, you have to restart your
 client
 for them to work.

 Is this actually a bug or one of the new features?


 ___
 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] -dti and Network Optimization

2006-03-17 Thread Yahn Bernier
The changes are in game_shared, look at StudioFrameAdvance for
m_flAnimTime and m_flCycle changes and at the physics simulation code
for whenever it simulates/moves the entity it'll set m_flSimulationTime
via the SetSimulationTime() call.

It's not unexpected that moving and animating entities send their
movement time/position and animation variables quite often.

Yahn

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Justin Krenz
Sent: Friday, March 17, 2006 4:34 PM
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] -dti and Network Optimization

I've been working on optimizing my mod and the -dti command has been
very helpful.  It doesn't seem to work on a dedicated server though.  Is
there anyway to get it to work?

I would like to see what the server is sending exactly because I'm in
confusion about some things that the client file says.  It says that a
few variables, specifically m_flAnimTime, m_flCycle, and
m_flSimulationTime of random entities have some of the highest decode
counts.  Yet, I don't see these variables being updated anywhere in the
server code.  I did find these variables getting updated on the client
however.  Thus, is the client confusing the local changing of these
variables to be info sent from the server and putting it in the -dti
output file?  If not, is anyone familiar with these variables and how to
stop them from being updated which seems to be a big waste of bandwidth
when the entities sending the variables aren't even animating or
changing in anyway?

___
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] -dti and Network Optimization

2006-03-17 Thread Yahn Bernier
You can remove them from networking by using something like the
following the entities' datatable ( if they are player fields you'll
have to tag them in the prediction data descs on the client )

SendPropExclude( DT_BaseAnimating, m_flPoseParameter ),
SendPropExclude( DT_BaseAnimating, m_flPlaybackRate ),
SendPropExclude( DT_BaseAnimating, m_nSequence ),
SendPropExclude( DT_BaseAnimating, m_nNewSequenceParity ),
SendPropExclude( DT_BaseAnimating, m_nResetEventsParity ),
SendPropExclude( DT_BaseAnimating, m_nMuzzleFlashParity ),
SendPropExclude( DT_BaseEntity, m_angRotation ),
SendPropExclude( DT_BaseAnimatingOverlay, overlay_vars ),

// playeranimstate and clientside animation takes care of these
on the client
SendPropExclude( DT_ServerAnimationData , m_flCycle ),
SendPropExclude( DT_AnimTimeMustBeFirst , m_flAnimTime ),

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Benjamin
Davison
Sent: Friday, March 17, 2006 6:31 PM
To: hlcoders@list.valvesoftware.com
Subject: Re: [hlcoders] -dti and Network Optimization

--
[ Picked text/plain from multipart/alternative ]
Can you share some of these optimisations?

On 3/18/06, Yahn Bernier [EMAIL PROTECTED] wrote:

 The changes are in game_shared, look at StudioFrameAdvance for
 m_flAnimTime and m_flCycle changes and at the physics simulation code
 for whenever it simulates/moves the entity it'll set
m_flSimulationTime
 via the SetSimulationTime() call.

 It's not unexpected that moving and animating entities send their
 movement time/position and animation variables quite often.

 Yahn

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Justin
Krenz
 Sent: Friday, March 17, 2006 4:34 PM
 To: hlcoders@list.valvesoftware.com
 Subject: [hlcoders] -dti and Network Optimization

 I've been working on optimizing my mod and the -dti command has been
 very helpful.  It doesn't seem to work on a dedicated server though.
Is
 there anyway to get it to work?

 I would like to see what the server is sending exactly because I'm in
 confusion about some things that the client file says.  It says that a
 few variables, specifically m_flAnimTime, m_flCycle, and
 m_flSimulationTime of random entities have some of the highest
decode
 counts.  Yet, I don't see these variables being updated anywhere in
the
 server code.  I did find these variables getting updated on the client
 however.  Thus, is the client confusing the local changing of these
 variables to be info sent from the server and putting it in the -dti
 output file?  If not, is anyone familiar with these variables and how
to
 stop them from being updated which seems to be a big waste of
bandwidth
 when the entities sending the variables aren't even animating or
 changing in anyway?

 ___
 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




--
- Benjamin Davison
--

___
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



  1   2   >