From 9751ab01932e217e9fb290fe72d9f9b489e5f746 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 24 Jan 2015 19:35:38 +1100 Subject: [PATCH] Fix compile and add more fun --- qcsrc/client/casings.qc | 2 +- qcsrc/client/gibs.qc | 19 ++++++++++--------- qcsrc/common/util-pre.qh | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/qcsrc/client/casings.qc b/qcsrc/client/casings.qc index 5b74e11b5..02e06001e 100644 --- a/qcsrc/client/casings.qc +++ b/qcsrc/client/casings.qc @@ -44,7 +44,7 @@ void Casing_Touch() if(time >= self.nextthink) { string s; - int f = floor(prandom() * 3) + 1;; + int f = floor(prandom() * 3) + 1; switch(self.state) { diff --git a/qcsrc/client/gibs.qc b/qcsrc/client/gibs.qc index 835d14a1e..5d8543a78 100644 --- a/qcsrc/client/gibs.qc +++ b/qcsrc/client/gibs.qc @@ -1,11 +1,11 @@ -.float silent; +.bool silent; void Gib_Delete() { remove(self); } -string species_prefix(float specnum) +string species_prefix(int specnum) { switch(specnum) { @@ -20,7 +20,7 @@ string species_prefix(float specnum) } } -void Gib_setmodel(entity gib, string mdlname, float specnum) +void Gib_setmodel(entity gib, string mdlname, int specnum) { switch(specnum) { @@ -48,7 +48,7 @@ void Gib_setmodel(entity gib, string mdlname, float specnum) } } -void new_te_bloodshower (float ef, vector org, float explosionspeed, float howmany) +void new_te_bloodshower (int ef, vector org, float explosionspeed, int howmany) { float i, pmod; pmod = autocvar_cl_particles_quality; @@ -109,7 +109,7 @@ void Gib_Draw() } } -void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector vrand, float specnum, float destroyontouch, float issilent) +void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector vrand, int specnum, bool destroyontouch, bool issilent) { entity gib; @@ -151,15 +151,16 @@ void TossGib (string mdlname, vector safeorg, vector org, vector vconst, vector RubbleLimit("gib", autocvar_cl_gibs_maxcount, Gib_Delete); } -void Ent_GibSplash(float isNew) +void Ent_GibSplash(bool isNew) { - float amount, type, specnum; + int amount, type, specnum; vector org, vel; string specstr; - float issilent; + bool issilent; string gentle_prefix = "morphed_"; - float c, randomvalue; + float randomvalue; + int c; type = ReadByte(); // gibbage type amount = ReadByte() / 16.0; // gibbage amount diff --git a/qcsrc/common/util-pre.qh b/qcsrc/common/util-pre.qh index c23174ce1..93db399ec 100644 --- a/qcsrc/common/util-pre.qh +++ b/qcsrc/common/util-pre.qh @@ -6,7 +6,7 @@ #define int float #define stoi(s) stof(s) -#define itos(s) stoi(s) +#define itos(s) ftos(s) #endif #ifndef QCC_SUPPORT_BOOL -- 2.39.2