-Werror -Wall \
-Wno-field-redeclared \
-Wno-double-declaration \
- -Wno-assign-function-types \
-Wno-unused-variable \
-Wno-uninitialized-global \
-O3 \
-fftepp \
-ftranslatable-strings \
-fadjust-vector-fields \
- -fassign-function-types \
+ -fno-assign-function-types \
-fcorrect-ternary \
-fcorrect-logic \
-ftrue-empty-strings \
draw_endBoldFont();
menu_visible = FALSE;
menu_show = menu_show_error;
- menu_action = menu_sub_null;
+ menu_action = func_null;
for(i = 0; i < 255; ++i)
if(getplayerkeyvalue(i, "viewentity") == "")
if (MapVote_InputEvent(bInputType, nPrimary, nSecondary))
return true;
- if(menu_visible)
+ if(menu_visible && menu_action)
if(menu_action(bInputType, nPrimary, nSecondary))
return TRUE;
#endif
// the NULL function
+#ifdef GMQCC
+#define func_null nil
+#define string_null nil
+#else
var void func_null(void);
var string string_null;
+#endif
float float2range11(float f);
float float2range01(float f);
{
if(caller) { caller.allowed_timeouts -= 1; }
- bprint(GetCallerName(caller), " ^7called a timeout", (caller ? strcat(" (", ftos(caller.allowed_timeouts), " timeout(s) left)") : string_null), "!\n"); // write a bprint who started the timeout (and how many they have left)
+ bprint(GetCallerName(caller), " ^7called a timeout", (caller ? strcat(" (", ftos(caller.allowed_timeouts), " timeout(s) left)") : ""), "!\n"); // write a bprint who started the timeout (and how many they have left)
timeout_status = TIMEOUT_LEADTIME;
timeout_caller = caller;
string separator = strreplace("%", " ", strcat((argv(1) ? argv(1) : " "), "^7"));
string tmp_netaddress, tmp_crypto_idfp;
- print_to(caller, strcat("List of client information", (privacy ? " (some data is hidden for privacy)" : string_null), ":"));
+ print_to(caller, strcat("List of client information", (privacy ? " (some data is hidden for privacy)" : ""), ":"));
print_to(caller, sprintf(strreplace(" ", separator, " %-4s %-20s %-5s %-3s %-9s %-16s %s "),
"ent", "nickname", "ping", "pl", "time", "ip", "crypto_id"));
strcat("^2:^1", ftos(vote_reject_count)),
((mincount >= 0) ? strcat("^2 (^1", ftos(mincount), "^2 needed)") : "^2"),
strcat(", ^1", ftos(vote_abstain_count), "^2 didn't care"),
- strcat(", ^1", ftos(notvoters), strcat("^2 didn't ", ((mincount >= 0) ? string_null : "have to "), "vote\n"))));
+ strcat(", ^1", ftos(notvoters), strcat("^2 didn't ", ((mincount >= 0) ? "" : "have to "), "vote\n"))));
if(autocvar_sv_eventlog)
{
#define ACTIVE_BUSY 2
#define ACTIVE_TOGGLE 3
.float active;
-.float (float act_state) setactive;
+.void (float act_state) setactive;
.entity realowner;
.float nex_charge;
self = e_old;
}
//dprint("Delayed initialization: ", self.classname, "\n");
- if(func != func_null)
+ if(func)
func();
else
{
{
e.customizeentityforclient = customizer;
e.uncustomizeentityforclient = uncustomizer;
- e.uncustomizeentityforclient_set = (uncustomizer != func_null);
+ e.uncustomizeentityforclient_set = !!uncustomizer;
}
.float nottargeted;
#endif
var vector pathlib_movenode(vector start,vector end,float doedge);
-vector pathlib_wateroutnode(vector start,vector end)
+vector pathlib_wateroutnode(vector start,vector end,float doedge)
{
vector surface;
return end;
}
-vector pathlib_swimnode(vector start,vector end)
+vector pathlib_swimnode(vector start,vector end,float doedge)
{
pathlib_movenode_goodnode = 0;
-vector pathlib_wateroutnode(vector start,vector end)
+vector pathlib_wateroutnode(vector start,vector end, float doedge)
{
vector surface;
return end;
}
-vector pathlib_swimnode(vector start,vector end)
+vector pathlib_swimnode(vector start,vector end, float doedge)
{
pathlib_movenode_goodnode = 0;
end_y = fsnap(end_y, pathlib_gridsize);
if(pointcontents(end) == CONTENT_EMPTY)
- return pathlib_wateroutnode( start, end);
+ return pathlib_wateroutnode( start, end, doedge);
tracebox(start, movenode_boxmin,movenode_boxmax, end, MOVE_WORLDONLY, self);
if(trace_fraction == 1)
return end;
}
-vector pathlib_flynode(vector start,vector end)
+vector pathlib_flynode(vector start,vector end, float doedge)
{
pathlib_movenode_goodnode = 0;
vector movenode_boxmin;
float pathlib_movenode_goodnode;
-vector pathlib_wateroutnode(vector start, vector end);
-vector pathlib_swimnode(vector start, vector end);
-vector pathlib_flynode(vector start, vector end);
+vector pathlib_wateroutnode(vector start, vector end, float doedge);
+vector pathlib_swimnode(vector start, vector end, float doedge);
+vector pathlib_flynode(vector start, vector end, float doedge);
vector pathlib_walknode(vector start, vector end, float doedge);
var vector pathlib_movenode(vector start, vector end, float doedge);
float SECRET_NO_SHOOT = 8; // only opened by trigger
float SECRET_YES_SHOOT = 16; // shootable even if targeted
-
void fd_secret_use()
{
float temp;
sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
}
+void fd_secret_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+{
+ fd_secret_use();
+}
+
// Wait after first movement...
void fd_secret_move1()
{
{
self.health = 10000;
self.takedamage = DAMAGE_YES;
- self.event_damage = fd_secret_use;
+ self.event_damage = fd_secret_damage;
}
self.oldorigin = self.origin;
if (!self.wait)
vector autocvar_g_vehicle_racer_bouncepain;
var vector racer_force_from_tag(string tag_name, float spring_length, float max_power);
-void racer_spawn(float _spawnflag);
+void racer_spawn_default();
void racer_align4point(float _delta)
{
DEATH_WAKIBLOWUP, world);
self.nextthink = time + autocvar_g_vehicle_racer_respawntime;
- self.think = racer_spawn;
+ self.think = racer_spawn_default;
self.movetype = MOVETYPE_NONE;
self.effects = EF_NODRAW;
self.velocity = '0 0 0';
setorigin(self, self.pos1);
- self.think = racer_spawn;
- self.nextthink = time + autocvar_g_vehicle_racer_respawntime;
}
void racer_deadtouch()
self.damageforcescale = 0.5;
//self.destvec = autocvar_g_vehicle_racer_bouncepain;
}
+void racer_spawn_default()
+{
+ racer_spawn(0);
+}
else if (req == WR_THINK)
{
float loadable_secondary;
- loadable_secondary = autocvar_g_balance_hagar_secondary_load && autocvar_g_balance_hagar_secondary;
+ loadable_secondary = (autocvar_g_balance_hagar_secondary_load && autocvar_g_balance_hagar_secondary);
if (loadable_secondary)
W_Hagar_Attack2_Load(); // must always run each frame
missile.solid = SOLID_BBOX;
missile.takedamage = DAMAGE_YES;
- missile.event_damage = Seeker_Tag_Explode;
- missile.health = autocvar_g_balance_seeker_tag_health;
+ missile.event_damage = Seeker_Tag_Damage;
+ missile.health = autocvar_g_balance_seeker_tag_health;
missile.damageforcescale = autocvar_g_balance_seeker_tag_damageforcescale;
setorigin (missile, w_shotorg);