]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/defs.qh
Declare more ints as ints
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / defs.qh
index f8e8952f98ea1afaaf07a6cd4b8f1da1733e7c8a..49e340c4970edff02b39fe1d3c208e57dbee47bd 100644 (file)
@@ -64,7 +64,7 @@ float server_is_dedicated;
 
 // Fields
 
-.void(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) event_damage;
+.void(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) event_damage;
 
 //.string      wad;
 //.string      map;
@@ -106,7 +106,7 @@ float server_is_dedicated;
 //.float cnt2;
 
 .float play_time;
-.float respawn_flags;
+.int respawn_flags;
 .float respawn_time;
 .float respawn_time_max;
 .float death_time;
@@ -182,9 +182,9 @@ const float MAX_DAMAGEEXTRARADIUS = 16;
 .entity exteriorweaponentity;
 .vector weaponentity_glowmod;
 
-//.float weapon; // current weapon
-.float switchweapon; // weapon requested to switch to
-.float switchingweapon; // weapon currently being switched to (is copied from switchweapon once switch is possible)
+//.int weapon; // current weapon
+.int switchweapon; // weapon requested to switch to
+.int switchingweapon; // weapon currently being switched to (is copied from switchweapon once switch is possible)
 .string weaponname; // name of .weapon
 
 // WEAPONTODO
@@ -199,14 +199,14 @@ void w_ready();
 
 
 // weapon states (self.weaponentity.state)
-const float WS_CLEAR                   = 0; // no weapon selected
-const float WS_RAISE                   = 1; // raise frame
-const float WS_DROP                            = 2; // deselecting frame
-const float WS_INUSE                   = 3; // fire state
-const float WS_READY                   = 4; // idle frame
+const int WS_CLEAR                     = 0; // no weapon selected
+const int WS_RAISE                     = 1; // raise frame
+const int WS_DROP                              = 2; // deselecting frame
+const int WS_INUSE                     = 3; // fire state
+const int WS_READY                     = 4; // idle frame
 
 // there is 2 weapon tics that can run in one server frame
-const float W_TICSPERFRAME = 2;
+const int W_TICSPERFRAME = 2;
 
 void weapon_defaultspawnfunc(float wpn);
 
@@ -250,7 +250,7 @@ float nJoinAllowed(entity ignore);
 
 .entity flagcarried;
 
-.float playerid;
+.int playerid;
 float playerid_last;
 .float noalign;                // if set to 1, the item or spawnpoint won't be dropped to the floor
 
@@ -284,8 +284,8 @@ float default_weapon_alpha;
 
 .float version_nagtime;
 
-const float NUM_JUMPPADSUSED = 3;
-.float jumppadcount;
+const int NUM_JUMPPADSUSED = 3;
+.int jumppadcount;
 .entity jumppadsused[NUM_JUMPPADSUSED];
 
 string gamemode_name;
@@ -333,7 +333,7 @@ float have_team_spawns_forteam[17]; // 0 = this team has no spawns, 1 = this tea
 .entity killindicator;
 .float killindicator_teamchange;
 
-void Damage (entity targ, entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
+void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
 
 float lockteams;
 
@@ -346,8 +346,8 @@ float tracebox_hits_trigger_hurt(vector start, vector mi, vector ma, vector end)
 float next_pingtime;
 
 .float Version;
-.float SendFlags;
-.float(entity to, float sendflags) SendEntity;
+.int SendFlags;
+.bool(entity to, int sendflags) SendEntity;
 
 // player sounds, voice messages
 // TODO implemented fall and falling
@@ -432,7 +432,7 @@ float independent_players;
 
 string clientstuff;
 .float phase;
-.float pressedkeys;
+.int pressedkeys;
 
 .float porto_forbidden;
 
@@ -515,11 +515,11 @@ string matchid;
 .float hit_time;
 .float typehit_time;
 
-.float damage_dealt_total; 
+.float damage_dealt_total;
 
 .float stat_leadlimit;
 
-float radar_showennemies;
+bool radar_showennemies;
 
 #ifdef PROFILING
 float client_cefc_accumulator;
@@ -527,7 +527,7 @@ float client_cefc_accumulatortime;
 #endif
 
 .float weapon_load[WEP_MAXCOUNT];
-.float ammo_none; // used by the reloading system, must always be 0
+.int ammo_none; // used by the reloading system, must always be 0
 .float clip_load;
 .float old_clip_load;
 .float clip_size;
@@ -539,7 +539,7 @@ float client_cefc_accumulatortime;
 .float vortex_chargepool_ammo;
 .float hagar_load;
 
-.float grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab
+.int grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab
 
 #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE
 // when doing this, hagar can go through clones
@@ -623,4 +623,8 @@ const int MIF_GUIDED_TAG = 128;
 .string playernick;
 .float elos;
 .float ranks;
-#endif
\ No newline at end of file
+
+.float init_for_player_needed;
+.void(entity) init_for_player;
+
+#endif