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
Mircea Kitsune [Sun, 20 Mar 2011 22:53:44 +0000 (00:53 +0200)]
Cvar the amount of health dead bodies must take in order to get gibbed. I thought this might have some uses, if the cost of one cvar can be accepted for this purpose. Currently defaulted to 100, as that feels best balanced to me.