]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Get rid of 2 fields
authorterencehill <piuntn@gmail.com>
Sun, 5 May 2019 11:10:36 +0000 (13:10 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 5 May 2019 11:10:36 +0000 (13:10 +0200)
qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc
qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh
qcsrc/common/notifications/all.qh

index 08bb7be948962f2d5c366cef5eab990f2853473d..2484240a26d1c83c62b9487bdcf85ff7d984b6ff 100644 (file)
@@ -341,7 +341,7 @@ void ctf_Handle_Drop(entity flag, entity player, int droptype)
        set_movetype(flag, MOVETYPE_TOSS);
        flag.takedamage = DAMAGE_YES;
        flag.angles = '0 0 0';
-       SetResourceExplicit(flag, RES_HEALTH, flag.max_flag_health);
+       SetResourceExplicit(flag, RES_HEALTH, flag.max_health);
        flag.ctf_droptime = time;
        flag.ctf_dropper = player;
        flag.ctf_status = FLAG_DROPPED;
@@ -363,7 +363,7 @@ void ctf_Handle_Drop(entity flag, entity player, int droptype)
 
        if(autocvar_g_ctf_flag_return_time || (autocvar_g_ctf_flag_return_damage && autocvar_g_ctf_flag_health))
        {
-               WaypointSprite_UpdateMaxHealth(flag.wps_flagdropped, flag.max_flag_health);
+               WaypointSprite_UpdateMaxHealth(flag.wps_flagdropped, flag.max_health);
                WaypointSprite_UpdateHealth(flag.wps_flagdropped, GetResource(flag, RES_HEALTH));
        }
 
@@ -679,7 +679,7 @@ void ctf_Handle_Pickup(entity flag, entity player, int pickuptype)
        switch(pickuptype)
        {
                case PICKUP_BASE: flag.ctf_pickuptime = time; break; // used for timing runs
-               case PICKUP_DROPPED: SetResourceExplicit(flag, RES_HEALTH, flag.max_flag_health); break; // reset health/return timelimit
+               case PICKUP_DROPPED: SetResourceExplicit(flag, RES_HEALTH, flag.max_health); break; // reset health/return timelimit
                default: break;
        }
 
@@ -954,13 +954,13 @@ void ctf_FlagThink(entity this)
                        }
                        if(this.ctf_flagdamaged_byworld)
                        {
-                               TakeResource(this, RES_HEALTH, ((this.max_flag_health / autocvar_g_ctf_flag_return_damage_delay) * FLAG_THINKRATE));
+                               TakeResource(this, RES_HEALTH, (this.max_health / autocvar_g_ctf_flag_return_damage_delay) * FLAG_THINKRATE);
                                ctf_CheckFlagReturn(this, RETURN_NEEDKILL);
                                return;
                        }
                        else if(autocvar_g_ctf_flag_return_time)
                        {
-                               TakeResource(this, RES_HEALTH, ((this.max_flag_health / autocvar_g_ctf_flag_return_time) * FLAG_THINKRATE));
+                               TakeResource(this, RES_HEALTH, (this.max_health / autocvar_g_ctf_flag_return_time) * FLAG_THINKRATE);
                                ctf_CheckFlagReturn(this, RETURN_TIMEOUT);
                                return;
                        }
@@ -1165,7 +1165,7 @@ void ctf_RespawnFlag(entity flag)
        //set_movetype(flag, ((flag.noalign) ? MOVETYPE_NONE : MOVETYPE_TOSS)); // would be desired, except maps that want floating flags have it set to fall!
        set_movetype(flag, MOVETYPE_NONE); // match the initial setup handling (flag doesn't move when spawned)
        flag.takedamage = DAMAGE_NO;
-       SetResourceExplicit(flag, RES_HEALTH, flag.max_flag_health);
+       SetResourceExplicit(flag, RES_HEALTH, flag.max_health);
        flag.solid = SOLID_TRIGGER;
        flag.velocity = '0 0 0';
        flag.angles = flag.mangle;
@@ -1251,8 +1251,8 @@ void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag e
        flag.solid = SOLID_TRIGGER;
        flag.takedamage = DAMAGE_NO;
        flag.damageforcescale = autocvar_g_ctf_flag_damageforcescale;
-       flag.max_flag_health = ((autocvar_g_ctf_flag_return_damage && autocvar_g_ctf_flag_health) ? autocvar_g_ctf_flag_health : 100);
-       SetResourceExplicit(flag, RES_HEALTH, flag.max_flag_health);
+       flag.max_health = ((autocvar_g_ctf_flag_return_damage && autocvar_g_ctf_flag_health) ? autocvar_g_ctf_flag_health : 100);
+       SetResourceExplicit(flag, RES_HEALTH, flag.max_health);
        flag.event_damage = ctf_FlagDamage;
        flag.pushable = true;
        flag.teleportable = TELEPORT_NORMAL;
index 350ad8c4ff6e0eed2304964fc4bd1c9ec31e5d7c..679dd850257a3286db8a56d1ecf76bc67971be31 100644 (file)
@@ -128,7 +128,6 @@ float ctf_captimerecord; // record time for capturing the flag
 .float ctf_droptime;
 .int ctf_status; // status of the flag (FLAG_BASE, FLAG_DROPPED, FLAG_CARRY declared globally)
 .entity ctf_dropper; // don't allow spam of dropping the flag
-.int max_flag_health;
 .float next_take_time;
 .bool ctf_flagdamaged_byworld;
 int ctf_teams;
index da8c5ba6e1880050ca7d3e5e534e0affedf49b53..dc63a70803963ceb4c7c8f2e9b49066a6dca225e 100644 (file)
@@ -310,7 +310,6 @@ float autocvar_notification_lifetime_mapload = 10;
 #endif
 
 #ifdef SVQC
-.float FRAG_VERBOSE;
 void Notification_GetCvars(entity this);
 float autocvar_notification_server_allows_location = 1; // 0 = no, 1 = yes
 #else