]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/effects/qc/damageeffects.qc
Merge branch 'master' into terencehill/hud_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / effects / qc / damageeffects.qc
index 09ec8868f430c2a58c62e0198fd2d64784f7be87..71e1e2a7bcdd96dcf3f72629d7e147d4db03aab3 100644 (file)
@@ -1,15 +1,4 @@
-#ifndef DAMAGEEFFECTS_H
-#define DAMAGEEFFECTS_H
-
-#ifdef CSQC
-#include <common/deathtypes/all.qh>
-#include <common/physics/movetypes/movetypes.qh>
-#include <client/mutators/events.qh>
-#include <common/vehicles/all.qh>
-#include <common/weapons/all.qh>
-#endif
-
-#endif
+#include "damageeffects.qh"
 
 #ifdef IMPLEMENTATION
 
@@ -81,7 +70,7 @@ void DamageEffect_Think(entity this)
        {
                // time is up or the player got gibbed / disconnected
                this.owner.total_damages = max(0, this.owner.total_damages - 1);
-               remove(this);
+               delete(this);
                return;
        }
        if(this.state && !this.owner.csqcmodel_isdead)
@@ -89,7 +78,7 @@ void DamageEffect_Think(entity this)
                // if the player was dead but is now alive, it means he respawned
                // if so, clear his damage effects, or damages from his dead body will be copied back
                this.owner.total_damages = max(0, this.owner.total_damages - 1);
-               remove(this);
+               delete(this);
                return;
        }
        this.state = this.owner.csqcmodel_isdead;
@@ -256,7 +245,7 @@ NET_HANDLE(ENT_CLIENT_DAMAGEINFO, bool isNew)
                        if(vdist(thisforce, !=, 0))
                        {
                                it.velocity = it.velocity + damage_explosion_calcpush(it.damageforcescale * thisforce, it.velocity, autocvar_g_balance_damagepush_speedfactor);
-                               it.flags &= ~FL_ONGROUND;
+                               UNSET_ONGROUND(it);
                        }
 
                if(w_issilent)