]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commit
Attempt (once again) to implement constant player damage effects. eg: If the player...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 2 Apr 2011 15:07:26 +0000 (18:07 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 2 Apr 2011 15:07:26 +0000 (18:07 +0300)
commite189b041a83858d7b8f02d673ae2cb58cac893df
tree5f9a09e6453737506b378c109e02cbdb9f640ce1
parenta5b4dca2f4950106e36c974e88a77602e3eda19b
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).
qcsrc/client/Main.qc
qcsrc/client/gibs.qc
qcsrc/common/constants.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_violence.qc