From: terencehill Date: Sun, 5 May 2019 11:10:36 +0000 (+0200) Subject: Get rid of 2 fields X-Git-Tag: xonotic-v0.8.5~1515 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=f209949abd44255ad1c08912c741118de42403fc Get rid of 2 fields --- diff --git a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc index 08bb7be948..2484240a26 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc @@ -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; diff --git a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh index 350ad8c4ff..679dd85025 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh @@ -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; diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index da8c5ba6e1..dc63a70803 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -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