[hlcoders] RE: Blood not spawning for attacker?
Hey, Well thank you Chris Janes for the fix, which I applied to the default bullet code in FireBullets on around line 158 of sdk_player_shared, and which fixed the blood problem. Here's the fixed code (all we did was move out the CTakeDamage initialise and calculations and the DispatchTraceAttack out of the #ifdef... //Imperio59: Fix for blood not being correctly predicted... CTakeDamageInfo info( pevAttacker, pevAttacker, fCurrentDamage, iDamageType ); #ifdef GAME_DLL ClearMultiDamage(); #endif CalculateBulletDamageForce( info, iBulletType, vecDir, tr.endpos ); tr.m_pEnt-DispatchTraceAttack( info, vecDir, tr ); #ifdef GAME_DLL TraceAttackToTriggers( info, tr.startpos, tr.endpos, vecDir ); ApplyMultiDamage(); #endif I'm gonna add this to the wiki list. Enjoy! ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] RE: Blood not spawning for attacker?
On Tuesday 27 June 2006 10:55 am, Imperio59 wrote: Hey, Well thank you Chris Janes for the fix, which I applied to the default bullet code in FireBullets on around line 158 of sdk_player_shared, and which fixed the blood problem. Here's the fixed code (all we did was move out the CTakeDamage initialise and calculations and the DispatchTraceAttack out of the #ifdef... I'm not so hot on that solution. As I understand it, for a normal bullet weapon, there are two parts to the impact effect: 1. Sparks/flecks/impact decal 2. Blood Only (1) should be predicted, because it doesn't require any server verification. Since these are minor effects (not gameplay-affecting), it's all right for the client to simulate them. Blood, however, is another matter. Blood spray is a visual confirmation to the player that he has indeed hit the target; and _this_ is not something you can afford to mispredict. Thus, the server should take care of telling the client to spawn the blood sprite. Now, as for your weapon, you'll need to do some thinking on this matter. For your particular mod, is the blood splatter gameplay-affecting or not? It makes sense for you that sparks should be predicted, but I'm not sure that blood should be the same way. Even if you do decide to predict blood, I would advise against changing it in sdk_player_shared, as this would affect _all_ weapons across your mod, even more conventional ones for which the player might expect conventional response. So, basically, your beef is with the prediction system, not sdk_player_shared. Watch out for hasty fixes :-P -John Sheu ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] RE: Blood not spawning for attacker?
I'm submitting this in a separate e-mail, since I'm not sure that it's completely in line with the subject of the thread, but I do think that it might have some useful points in common. So, with regards to my question of a while ago that went conveniently unaswered: What kind of timebase is the client rendering on? Does it try to be exactly synchronized with the server, regardless of latency, or does it just monotonically increase its current time as it receives packets? What I'm doing is creating a tempent with a fixed velocity. Every client frame, it simulates itself forward along that velocity. Now, if I just create it as usual, by the time the creation command gets to the client, the tempent will already be somewhere behind where it should be (if the client renders ahead). So, is the client ahead? If I need to pre-simulate the tempent forward, how far forward should I simulate it? I've been thinking about this as a way of reducing that blood-splatter-emerges-from-somewhere-behind-the-player effect that you see with hitscan weapons. -John Sheu ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
Re: [hlcoders] RE: Blood not spawning for attacker?
-- [ Picked text/plain from multipart/alternative ] With lag compensation, predicting blood spawning shouldn't really be an issue (unless cl_predict is 0 [which it shouldn't be]). -- ts2do -- ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Re: Blood not spawning for attacker?
Yep, so it's a prediction problem. cl_predict 0 makes it so that the sparks show up in any situation, same for the blood... I'm gonna try and track it down, any ideas? ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
[hlcoders] Re: Blood not spawning for attacker?
Ok, I spent a couple hours on the problem and managed a fix... I basically put a warning in the sparks function, and it did not play when you were the attacker... So instead of trying to fix weird PVS filter bugs, I decided to switch the call to a DispatchEffect call instead of the previous g_pEffects-Sparks() call. I made my own DispatchEffect Callback function and event register and linked it all nicely, and now it plays out fine. I might try and do the same for the blood, if I have the patience, but not right now, it's 4am and I'm going to BED! ;) Imperio59 out. ___ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders