From 97ca2e274c204ac1d1f4ede23705b3d2422db5ff Mon Sep 17 00:00:00 2001 From: div0 Date: Sat, 19 Jan 2008 09:08:40 +0000 Subject: [PATCH] database, stringbuffer and FTE_STRINGS for menu QC; credits dialog git-svn-id: svn://svn.icculus.org/nexuiz/trunk@3181 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/gfx/menu/default/skinvalues.txt | 9 ++ data/gfx/menu/xaw/skinvalues.txt | 9 ++ data/nexuiz-credits.txt | 103 ++++-------------- data/qcsrc/common/util.qc | 91 ++++++++++++---- data/qcsrc/common/util.qh | 16 +++ data/qcsrc/menu-div0test/classes.c | 2 + data/qcsrc/menu-div0test/mbuiltin.qh | 44 +++++++- data/qcsrc/menu-div0test/nexuiz/mainwindow.c | 6 + .../menu-div0test/skin-customizables.inc | 9 ++ data/qcsrc/menu/mbuiltin.qc | 22 ++++ data/qcsrc/server/cl_client.qc | 2 +- data/qcsrc/server/clientcommands.qc | 2 +- data/qcsrc/server/extensions.qh | 11 +- data/qcsrc/server/g_world.qc | 6 +- data/qcsrc/server/keyhunt.qc | 2 +- data/qcsrc/server/miscfunctions.qc | 5 - data/qcsrc/server/runematch.qc | 2 +- data/qcsrc/server/t_jumppads.qc | 2 +- 18 files changed, 222 insertions(+), 121 deletions(-) diff --git a/data/gfx/menu/default/skinvalues.txt b/data/gfx/menu/default/skinvalues.txt index b4a6e4c06..ea0063c61 100644 --- a/data/gfx/menu/default/skinvalues.txt +++ b/data/gfx/menu/default/skinvalues.txt @@ -13,6 +13,7 @@ COLOR_DIALOG_MUTATORS '0.7 0.7 1' COLOR_DIALOG_MAPINFO '0.7 0.7 1' COLOR_DIALOG_USERBIND '0.7 0.7 1' COLOR_DIALOG_SINGLEPLAYER '1 1 0.7' +COLOR_DIALOG_CREDITS '0.7 0.7 1' // mouse // uses "cursor" images @@ -49,6 +50,14 @@ COLOR_CHECKBOX_C '1 1 1' COLOR_CHECKBOX_F '1 1 1' COLOR_CHECKBOX_D '1 1 1' +// item: credits list +COLOR_CREDITS_TITLE '1 1 1' +ALPHA_CREDITS_TITLE 1 +COLOR_CREDITS_FUNCTION '1 1 1' +ALPHA_CREDITS_FUNCTION 0.7 +COLOR_CREDITS_PERSON '0.7 0.7 1' +ALPHA_CREDITS_PERSON 0.7 + // item: crosshair button // uses "crosshairbutton" images diff --git a/data/gfx/menu/xaw/skinvalues.txt b/data/gfx/menu/xaw/skinvalues.txt index ab798772a..29b922b8d 100644 --- a/data/gfx/menu/xaw/skinvalues.txt +++ b/data/gfx/menu/xaw/skinvalues.txt @@ -13,6 +13,7 @@ COLOR_DIALOG_SETTINGS '1 1 1' COLOR_DIALOG_TEAMSELECT '1 1 1' COLOR_DIALOG_USERBIND '1 1 1' COLOR_DIALOG_SINGLEPLAYER '1 1 1' +COLOR_DIALOG_CREDITS '1 1 1' // mouse // uses cursor.tga @@ -52,6 +53,14 @@ COLOR_CHECKBOX_D '1 1 1' // item: crosshair button // uses crosshairbutton.tga +// item: credits list +COLOR_CREDITS_TITLE '1 1 1' +ALPHA_CREDITS_TITLE 1 +COLOR_CREDITS_FUNCTION '0 0 0' +ALPHA_CREDITS_FUNCTION 1 +COLOR_CREDITS_PERSON '0 0 0' +ALPHA_CREDITS_PERSON 1 + // item: dialog // uses border.tga // uses closebutton.tga diff --git a/data/nexuiz-credits.txt b/data/nexuiz-credits.txt index d38759427..7a6403d62 100644 --- a/data/nexuiz-credits.txt +++ b/data/nexuiz-credits.txt @@ -1,172 +1,115 @@ -Team: - +**Team: Lee Vermeulen -Project Founder and Co-Designer +*Project Founder and Co-Designer Forest "LordHavoc" Hale -Lead Programmer and Co-Designer +*Lead Programmer and Co-Designer SavageX -Project Maintainer +*Project Maintainer -In alphabetical order -(nickname or surname) +**In alphabetical order +**(nickname or surname) Andreas "Black" Kirsch -Programmer +*Programmer Kurt Dereli -Lead Artist - +*Lead Artist Yves "EviLair" Allaire -Artist - +*Artist Stephan "esteel" Stahl -Programmer - +*Programmer Fabien "H. Reaper" Tschirhart -Level Designer - +*Level Designer "Innovati" -Menu Artist - +*Menu Artist KadaverJack -Programmer +*Programmer MauveBib -Bot Programmer - +*Bot Programmer Peter "Morphed" Pielak -2d Artist, Menu Artist - +*2d Artist, Menu Artist Rick "Rat" Kelley -Lead Animator, Skinner +*Lead Animator, Skinner Rudolf "div0" Polzer -Programmer +*Programmer Paul "Strahlemann" Evers -Co-Lead Level Designer - +*Co-Lead Level Designer Gottfried "Toddd" Hofmann -Sound FX - +*Sound FX Marko "Urre" Permanto -Bot Programmer - +*Bot Programmer Dan "Wazat" Hale -Programmer - +*Programmer Garth "Zombie" Hendy -Level Designer +*Level Designer - -Thanks: +**Thanks: Gerd "Elysis" Raudenbusch - Qantourisc - Tymo - Spirit - Attila "WW3" Houtkooper - GreEn`mArine - Dan "Digger" Korostelev - Kristian "morfar" Johansson - leileilol - Jody Gallagher - Donkey - Vortex - Juergen "LowDragon" Timm - Sajt - Supajoe - lcatlnx - Zenex - Q1 Retexturing Project - Tomaz - Jitspoe - "Parapraxis" - NoelCower - Brain Younds - Spike - Petithomme - Tei - Munyul - Mathieu "Elric" Olivier - SomeGuy - Lee David Ash - Shank - FrikaC - Dustin Geeraert - Steve Vermeulen - Edgenetwork - Clinton "Kaziganthe" Freeman - Jakob "tZork" Markstrom Grohn - BigMac - Mephisto - michaelb - dstrek - Netzwerg - Ulrich Galbraith - Christian Ice - Wolfgang "Blub\0" Bumiller diff --git a/data/qcsrc/common/util.qc b/data/qcsrc/common/util.qc index 3d3db1fb4..7288a663a 100644 --- a/data/qcsrc/common/util.qc +++ b/data/qcsrc/common/util.qc @@ -234,34 +234,51 @@ string fstrunzone(string s) return sc; } -#if 0 -#define DB_BUCKETS 16384 -void db_save(float db, string filename) +// Databases (hash tables) +#define DB_BUCKETS 8192 +void db_save(float db, string pFilename) { - float fh, i; - fh = fopen(filename, FILE_WRITE); + float fh, i, n; + fh = fopen(pFilename, FILE_WRITE); if(fh < 0) - error(strcat("Can't write DB to ", filename)); - for(i = 0; i < DB_BUCKETS; ++i) + error(strcat("Can't write DB to ", pFilename)); + n = buf_getsize(db); + fputs(fh, strcat(ftos(DB_BUCKETS), "\n")); + for(i = 0; i < n; ++i) fputs(fh, strcat(bufstr_get(db, i), "\n")); fclose(fh); } -float db_load(string filename) +float db_load(string pFilename) { - float db, fh, i; + float db, fh, i, j, n; string l; db = buf_create(); if(db < 0) return -1; - fh = fopen(filename, FILE_READ); + fh = fopen(pFilename, FILE_READ); if(fh < 0) return db; - while((l = fgets(fh))) + if(stof(fgets(fh)) == DB_BUCKETS) { - if(l != "") - bufstr_set(db, i, l); - ++i; + i = 0; + while((l = fgets(fh))) + { + if(l != "") + bufstr_set(db, i, l); + ++i; + } + } + else + { + // different count of buckets? + // need to reorganize the database then (SLOW) + while((l = fgets(fh))) + { + n = tokenizebyseparator(l, "\\"); + for(j = 0; j < n; j += 2) + db_put(db, argv(j), argv(j+1)); + } } fclose(fh); return db; @@ -272,18 +289,18 @@ void db_close(float db) buf_del(db); } -string db_get(float db, string key) +string db_get(float db, string pKey) { float h; - h = math_mod(hash(FALSE, key), DB_BUCKETS); - return infoget(bufstr_get(db, h), key); + h = mod(crc16(FALSE, pKey), DB_BUCKETS); + return infoget(bufstr_get(db, h), pKey); } -void db_put(float db, string key, string value) +void db_put(float db, string pKey, string pValue) { float h; - h = math_mod(hash(FALSE, key), DB_BUCKETS); - bufstr_set(db, h, infoadd(bufstr_get(db, h), key, value)); + h = mod(crc16(FALSE, pKey), DB_BUCKETS); + bufstr_set(db, h, infoadd(bufstr_get(db, h), pKey, pValue)); } void db_test() @@ -300,4 +317,36 @@ void db_test() db_close(db); print("CLOSED.\n"); } -#endif + +// Multiline text file buffers +float buf_load(string pFilename) +{ + float buf, fh, i; + string l; + buf = buf_create(); + if(buf < 0) + return -1; + fh = fopen(pFilename, FILE_READ); + if(fh < 0) + return buf; + i = 0; + while((l = fgets(fh))) + { + bufstr_set(buf, i, l); + ++i; + } + fclose(fh); + return buf; +} + +void buf_save(float buf, string pFilename) +{ + float fh, i, n; + fh = fopen(pFilename, FILE_WRITE); + if(fh < 0) + error(strcat("Can't write buf to ", pFilename)); + n = buf_getsize(buf); + for(i = 0; i < n; ++i) + fputs(fh, strcat(bufstr_get(buf, i), "\n")); + fclose(fh); +} diff --git a/data/qcsrc/common/util.qh b/data/qcsrc/common/util.qh index d4390abe3..af0c04bd7 100644 --- a/data/qcsrc/common/util.qh +++ b/data/qcsrc/common/util.qh @@ -35,3 +35,19 @@ vector colormapPaletteColor(float c, float isPants); // unzone the string, and return it as tempstring. Safe to be called on string_null string fstrunzone(string s); + +// database (NOTE: keys are case sensitive) +void db_save(float db, string filename); +float db_load(string filename); +void db_close(float db); +string db_get(float db, string key); +void db_put(float db, string key, string value); + +// stringbuffer loading/saving +float buf_load(string filename); +void buf_save(float buf, string filename); + +// modulo function +#ifndef MENUQC +float mod(float a, float b) { return a - (floor(a / b) * b); } +#endif diff --git a/data/qcsrc/menu-div0test/classes.c b/data/qcsrc/menu-div0test/classes.c index d6d4f0cb0..f4ff8cb24 100644 --- a/data/qcsrc/menu-div0test/classes.c +++ b/data/qcsrc/menu-div0test/classes.c @@ -61,3 +61,5 @@ #include "nexuiz/dialog_singleplayer.c" #include "nexuiz/campaign.c" #include "nexuiz/dialog_singleplayer_winner.c" +#include "nexuiz/dialog_credits.c" +#include "nexuiz/credits.c" diff --git a/data/qcsrc/menu-div0test/mbuiltin.qh b/data/qcsrc/menu-div0test/mbuiltin.qh index d5b259d9a..7dcb52850 100644 --- a/data/qcsrc/menu-div0test/mbuiltin.qh +++ b/data/qcsrc/menu-div0test/mbuiltin.qh @@ -102,12 +102,6 @@ float strlen(string s) = #52; string strcat(string s1, ...) = #53; string substring(string s, float start, float length) = #54; -float(string str, string sub, float startpos) strstrofs = #221; -float(string s1, string s2, float len) strncmp = #228; -float(string s1, string s2) strcasecmp = #229; -float(string s1, string s2, float len) strncasecmp = #230; - - vector stov(string s) = #55; #ifdef PROFILESTRZONE @@ -249,6 +243,44 @@ void gecko_mousemove( string name, float x, float y ) = #491; void gecko_resize( string name, float w, float h ) = #492; vector gecko_get_texture_extent( string name ) = #493; +//FTE_STRINGS +//idea: many +//darkplaces implementation: KrimZon +//description: +//various string manipulation functions +float(string str, string sub, float startpos) strstrofs = #221; +float(string str, float ofs) str2chr = #222; +string(float c, ...) chr2str = #223; +string(float ccase, float calpha, float cnum, string s, ...) strconv = #224; +string(float chars, string s, ...) strpad = #225; +string(string info, string key, string value, ...) infoadd = #226; +string(string info, string key) infoget = #227; +float(string s1, string s2, float len) strncmp = #228; +float(string s1, string s2) strcasecmp = #229; +float(string s1, string s2, float len) strncasecmp = #230; + +//DP_QC_STRINGBUFFERS +//idea: ?? +//darkplaces implementation: LordHavoc +//functions to manage string buffer objects - that is, arbitrary length string arrays that are handled by the engine +float() buf_create = #440; +void(float bufhandle) buf_del = #441; +float(float bufhandle) buf_getsize = #442; +void(float bufhandle_from, float bufhandle_to) buf_copy = #443; +void(float bufhandle, float sortpower, float backward) buf_sort = #444; +string(float bufhandle, string glue) buf_implode = #445; +string(float bufhandle, float string_index) bufstr_get = #446; +void(float bufhandle, float string_index, string str) bufstr_set = #447; +float(float bufhandle, string str, float order) bufstr_add = #448; +void(float bufhandle, float string_index) bufstr_free = #449; + +//DP_QC_CRC16 +//idea: div0 +//darkplaces implementation: div0 +//Some hash function to build hash tables with. This has to be be the CRC-16-CCITT that is also required for the QuakeWorld download protocol. +//When caseinsensitive is set, the CRC is calculated of the lower cased string. +float(float caseinsensitive, string s, ...) crc16 = #494; + #ifdef FIXEDFOPEN float fopen( string filename, float mode ) = { diff --git a/data/qcsrc/menu-div0test/nexuiz/mainwindow.c b/data/qcsrc/menu-div0test/nexuiz/mainwindow.c index 648364c97..bf2fb36a9 100644 --- a/data/qcsrc/menu-div0test/nexuiz/mainwindow.c +++ b/data/qcsrc/menu-div0test/nexuiz/mainwindow.c @@ -73,6 +73,12 @@ void configureMainWindowMainWindow(entity me) n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); n.setNexposee(n, i, '0.9 1.2 0', SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y); n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight)); + + i = spawnNexuizCreditsDialog(); + i.configureDialog(i); + n.addItemCentered(n, i, i.intendedWidth * eX + i.intendedHeight * eY, SKINALPHAS_MAINMENU_z); + n.setNexposee(n, i, '0.5 1.2 0', SKINALPHAS_MAINMENU_x, SKINALPHAS_MAINMENU_y); + n.pullNexposee(n, i, eY * (SKINHEIGHT_TITLE * SKINFONTSIZE_TITLE / conheight)); me.addItem(me, n, '0 0 0', '1 1 0', SKINALPHAS_MAINMENU_z); me.moveItemAfter(me, n, NULL); diff --git a/data/qcsrc/menu-div0test/skin-customizables.inc b/data/qcsrc/menu-div0test/skin-customizables.inc index 8c8ecfbfd..bbc8176e6 100644 --- a/data/qcsrc/menu-div0test/skin-customizables.inc +++ b/data/qcsrc/menu-div0test/skin-customizables.inc @@ -45,6 +45,7 @@ SKINBEGIN SKINVECTOR(COLOR_DIALOG_MAPINFO, '0.7 0.7 1'); SKINVECTOR(COLOR_DIALOG_USERBIND, '0.7 0.7 1'); SKINVECTOR(COLOR_DIALOG_SINGLEPLAYER, '1 1 0.7'); + SKINVECTOR(COLOR_DIALOG_CREDITS, '0.7 0.7 1'); // mouse SKINSTRING(GFX_CURSOR, "cursor"); @@ -81,6 +82,14 @@ SKINBEGIN SKINVECTOR(COLOR_CHECKBOX_F, '1 1 1'); SKINVECTOR(COLOR_CHECKBOX_D, '1 1 1'); + // item: credits list + SKINVECTOR(COLOR_CREDITS_TITLE, '1 1 1'); + SKINFLOAT(ALPHA_CREDITS_TITLE, 1); + SKINVECTOR(COLOR_CREDITS_FUNCTION, '1 1 1'); + SKINFLOAT(ALPHA_CREDITS_FUNCTION, 0.7); + SKINVECTOR(COLOR_CREDITS_PERSON, '0.7 0.7 1'); + SKINFLOAT(ALPHA_CREDITS_PERSON, 0.7); + // item: crosshair button SKINSTRING(GFX_CROSSHAIRBUTTON, "crosshairbutton"); diff --git a/data/qcsrc/menu/mbuiltin.qc b/data/qcsrc/menu/mbuiltin.qc index b9bf31424..453286895 100644 --- a/data/qcsrc/menu/mbuiltin.qc +++ b/data/qcsrc/menu/mbuiltin.qc @@ -249,6 +249,28 @@ void gecko_mousemove( string name, float x, float y ) = #491; void gecko_resize( string name, float w, float h ) = #492; vector gecko_get_texture_extent( string name ) = #493; +//DP_QC_STRINGBUFFERS +//idea: ?? +//darkplaces implementation: LordHavoc +//functions to manage string buffer objects - that is, arbitrary length string arrays that are handled by the engine +float() buf_create = #440; +void(float bufhandle) buf_del = #441; +float(float bufhandle) buf_getsize = #442; +void(float bufhandle_from, float bufhandle_to) buf_copy = #443; +void(float bufhandle, float sortpower, float backward) buf_sort = #444; +string(float bufhandle, string glue) buf_implode = #445; +string(float bufhandle, float string_index) bufstr_get = #446; +void(float bufhandle, float string_index, string str) bufstr_set = #447; +float(float bufhandle, string str, float order) bufstr_add = #448; +void(float bufhandle, float string_index) bufstr_free = #449; + +//DP_QC_CRC16 +//idea: div0 +//darkplaces implementation: div0 +//Some hash function to build hash tables with. This has to be be the CRC-16-CCITT that is also required for the QuakeWorld download protocol. +//When caseinsensitive is set, the CRC is calculated of the lower cased string. +float(float caseinsensitive, string s, ...) crc16 = #494; + #ifdef FIXEDFOPEN float fopen( string filename, float mode ) = { diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index ba023daf7..8bdefd376 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -404,7 +404,7 @@ float RestrictSkin(float s) return s; if(s == 6) return 6; - return math_mod(s, 3); + return mod(s, 3); } void FixPlayermodel() diff --git a/data/qcsrc/server/clientcommands.qc b/data/qcsrc/server/clientcommands.qc index c45623e04..c10aa3a2d 100644 --- a/data/qcsrc/server/clientcommands.qc +++ b/data/qcsrc/server/clientcommands.qc @@ -457,7 +457,7 @@ void SV_ParseClientCommand(string s) { sprint(self, "^7Maps in list: "); for(i = 0; i < n; ++i) { - if(math_mod(i, 2)) + if(mod(i, 2)) col = "^2"; else col = "^3"; diff --git a/data/qcsrc/server/extensions.qh b/data/qcsrc/server/extensions.qh index 22d1a8191..192416d81 100644 --- a/data/qcsrc/server/extensions.qh +++ b/data/qcsrc/server/extensions.qh @@ -1540,6 +1540,9 @@ float(string s1, string s2) strcasecmp = #229; float(string s1, string s2, float len) strncasecmp = #230; //DP_QC_STRINGBUFFERS +//idea: ?? +//darkplaces implementation: LordHavoc +//functions to manage string buffer objects - that is, arbitrary length string arrays that are handled by the engine float() buf_create = #460; void(float bufhandle) buf_del = #461; float(float bufhandle) buf_getsize = #462; @@ -1550,4 +1553,10 @@ string(float bufhandle, float string_index) bufstr_get = #466; void(float bufhandle, float string_index, string str) bufstr_set = #467; float(float bufhandle, string str, float order) bufstr_add = #468; void(float bufhandle, float string_index) bufstr_free = #469; -float(float caseinsensitive, string s, ...) hash = #487; + +//DP_QC_CRC16 +//idea: div0 +//darkplaces implementation: div0 +//Some hash function to build hash tables with. This has to be be the CRC-16-CCITT that is also required for the QuakeWorld download protocol. +//When caseinsensitive is set, the CRC is calculated of the lower cased string. +float(float caseinsensitive, string s, ...) crc16 = #494; diff --git a/data/qcsrc/server/g_world.qc b/data/qcsrc/server/g_world.qc index 00a669ddb..7f97812b4 100644 --- a/data/qcsrc/server/g_world.qc +++ b/data/qcsrc/server/g_world.qc @@ -483,7 +483,7 @@ float() MaplistMethod_Iterate = // usual method for(i = 1; i < Map_Count; ++i) { float mapindex; - mapindex = math_mod(i + Map_Current, Map_Count); + mapindex = mod(i + Map_Current, Map_Count); if(Map_Check(mapindex, pass)) return mapindex; } @@ -507,7 +507,7 @@ float() MaplistMethod_Random = // random map selection for(i = 0; i <= imax; ++i) { float mapindex; - mapindex = math_mod(Map_Current + ceil(random() * (Map_Count - 1)), Map_Count); // any OTHER map + mapindex = mod(Map_Current + ceil(random() * (Map_Count - 1)), Map_Count); // any OTHER map if(Map_Check(mapindex, 1)) return mapindex; } @@ -1984,7 +1984,7 @@ void MapVote_Tick() { tmp = mapvote_maps[i]; tmp = strpad(mapvote_maxlen, tmp); - tmp = strcat(ftos(math_mod(i + 1, 10)), ": ", tmp); + tmp = strcat(ftos(mod(i + 1, 10)), ": ", tmp); if(mapvote_detail) { tmp = strcat(tmp, " ^2(", ftos(mapvote_votes[i]), " vote"); diff --git a/data/qcsrc/server/keyhunt.qc b/data/qcsrc/server/keyhunt.qc index ffbecb4ce..054983957 100644 --- a/data/qcsrc/server/keyhunt.qc +++ b/data/qcsrc/server/keyhunt.qc @@ -458,7 +458,7 @@ void kh_Key_Think() if(self.owner) { #ifndef KH_PLAYER_USE_ATTACHMENT - makevectors('0 1 0' * (self.cnt + math_mod(time, 360) * KH_KEY_XYSPEED)); + makevectors('0 1 0' * (self.cnt + mod(time, 360) * KH_KEY_XYSPEED)); setorigin(self, v_forward * KH_KEY_XYDIST + '0 0 1' * self.origin_z); #endif diff --git a/data/qcsrc/server/miscfunctions.qc b/data/qcsrc/server/miscfunctions.qc index ab19ea480..428fbe73b 100644 --- a/data/qcsrc/server/miscfunctions.qc +++ b/data/qcsrc/server/miscfunctions.qc @@ -168,11 +168,6 @@ void() GameLogClose = } } -float math_mod(float a, float b) -{ - return a - (floor(a / b) * b); -} - void relocate_spawnpoint() { // nudge off the floor diff --git a/data/qcsrc/server/runematch.qc b/data/qcsrc/server/runematch.qc index cc82e384d..fe9f47db6 100644 --- a/data/qcsrc/server/runematch.qc +++ b/data/qcsrc/server/runematch.qc @@ -171,7 +171,7 @@ void RuneCarriedThink() rune = find(rune, classname, "rune"); } - ang_y = rnum*(360 / rcount) + math_mod(time, 360)*45;//180; + ang_y = rnum*(360 / rcount) + mod(time, 360)*45;//180; makevectors(ang); diff --git a/data/qcsrc/server/t_jumppads.qc b/data/qcsrc/server/t_jumppads.qc index 5d86a7cca..b14b4a174 100644 --- a/data/qcsrc/server/t_jumppads.qc +++ b/data/qcsrc/server/t_jumppads.qc @@ -137,7 +137,7 @@ void() trigger_push_touch = found = TRUE; if(!found) { - other.(jumppadsused[math_mod(other.jumppadcount, NUM_JUMPPADSUSED)]) = self; + other.(jumppadsused[mod(other.jumppadcount, NUM_JUMPPADSUSED)]) = self; other.jumppadcount = other.jumppadcount + 1; } } -- 2.39.2