Mircea Kitsune [Sun, 3 Apr 2011 21:33:12 +0000 (00:33 +0300)]
Undo one of my changes with ent num. I think it's best for our code if the body entnum is sent as it is, as our own damaged body can be shown to us after respawn.
Mircea Kitsune [Sun, 3 Apr 2011 21:30:40 +0000 (00:30 +0300)]
Make dead bodies not take any more damage after they gib. This should have always happened IMO, as it makes no sense to make a fully hidden entity jump around when shot.
Mircea Kitsune [Sun, 3 Apr 2011 21:02:30 +0000 (00:02 +0300)]
Fix many issues with how the effect is handles. Including copying it to dead bodies in CopyBody, removing it from players that disconnect or become spectators, and removing previous effects from players that respawn.
Mircea Kitsune [Sun, 3 Apr 2011 16:53:32 +0000 (19:53 +0300)]
Second part of my latest change. When a body is gibbed, the damage effect will apply to the gibs instead of him. This will need much more work, as showing the same effect on each gib causes too many particles.
Mircea Kitsune [Sun, 3 Apr 2011 16:32:25 +0000 (19:32 +0300)]
First part of my attempt to apply damage effects to gibs as well. Send the entity number of the player when gibbing occurs, and set each gib's team function to it. The damage code in the client shall later scan for gibs, and if their owner's entity number is the same as the damaged player, draw particles there instead.
Mircea Kitsune [Sun, 3 Apr 2011 12:12:12 +0000 (15:12 +0300)]
Network over one more byte, specifying if the damaged player is our own self. We need to know this in the client so we can disable self damage effects only if we aren't in chase_active mode, or other circumstances. I couldn't find any way to determine this in the client, so I have to network one more byte for this.
Mircea Kitsune [Sat, 2 Apr 2011 21:55:45 +0000 (00:55 +0300)]
If the repeater is being updated, increase its lifetime instead of re-setting it entirely. This fixes the shotgun among other things, where only the damage of one bullet would be taken into account. Also fix an issue I can't understand with some field entities...
Mircea Kitsune [Sat, 2 Apr 2011 21:10:23 +0000 (00:10 +0300)]
Do as said in the last commit, and update the effect instead of waiting for old ones to finish. eg: If you are shot with the Laser while still bleeding after having been shot by the Shotgun, the damage effect will update to the red laser smoke and replace the blood, rather than being ignored cuz we were still bleeding from the Shotgun.
Mircea Kitsune [Sat, 2 Apr 2011 20:57:50 +0000 (23:57 +0300)]
Turn the repeater entity into a field entity. This will allow us to modify its properties, allowing some new features (such as modifying the existing damage effect rather than having to wait for it to finish so we can spawn a new one).
Mircea Kitsune [Sat, 2 Apr 2011 20:50:15 +0000 (23:50 +0300)]
Base the lifetime of a damage effect on the damage done. Amount stays the same, but the more damage the longer the effect will last. Does not add and extra networking, as this is done server-side.
Mircea Kitsune [Sat, 2 Apr 2011 17:09:45 +0000 (20:09 +0300)]
If the weapon is a bullet weapon (shotgun uzi or sniper), its damage effect is blood. Since blood is species dependent, we make their effects per-species.
Mircea Kitsune [Sat, 2 Apr 2011 15:46:44 +0000 (18:46 +0300)]
Return if a damage effect is already active for that player. Else shooting a player too much will cause the effect to spam, and network too many bites at a time (which could cause lag). Not fully sure if this is needed, but its safest for now.
Mircea Kitsune [Sat, 2 Apr 2011 15:07:26 +0000 (18:07 +0300)]
Attempt (once again) to implement constant player damage effects. eg: If the player is shot with the uzi, blood will fall out of him for a few seconds. If he's shot with the electro, blue steam will come out of him instead. While if shot with a rocket, fire will come out of him. This is an effect only, and is not functional yet (just basic code in place).
How it works: It uses the same system as blood and gibs. When the player is damaged, the server creates an entity that will constantly send a client entity with info (such as origin and damage weapon). The client then receives it, and spawns particles at the player's origin each time the entity is sent. Once the lifetime of the server-side sender expires, the effect stops. The reason the repeater can't be client side is because we can't track an individual player's origin there (or at least not that I know of).
terencehill [Tue, 22 Mar 2011 18:30:55 +0000 (19:30 +0100)]
Check for negative values returned by search_begin searching for waypoints frames
Also add a function to load waypoints frames of a specific extension to avoid code duplication
Actually, previous code is changed with the addition of the check for dh and of the variable ext_len