]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Lyberta/TeamplayOverhaul2
authorLyberta <lyberta@lyberta.net>
Fri, 17 Aug 2018 22:36:10 +0000 (01:36 +0300)
committerLyberta <lyberta@lyberta.net>
Fri, 17 Aug 2018 22:36:10 +0000 (01:36 +0300)
69 files changed:
.gitlab-ci.yml
commands.cfg
gfx/hud/luma/weaponhmg.tga
gfx/hud/luma/weaponrpc.tga
qcsrc/client/autocvars.qh
qcsrc/client/defs.qh
qcsrc/client/hud/panel/quickmenu.qc
qcsrc/client/hud/panel/scoreboard.qh
qcsrc/client/main.qc
qcsrc/client/main.qh
qcsrc/client/mapvoting.qh
qcsrc/common/campaign_common.qh
qcsrc/common/command/generic.qc
qcsrc/common/command/generic.qh
qcsrc/common/command/rpn.qc
qcsrc/common/command/rpn.qh
qcsrc/common/debug.qh
qcsrc/common/gamemodes/gamemode/ctf/ctf.qc
qcsrc/common/gamemodes/gamemode/domination/domination.qc
qcsrc/common/gamemodes/gamemode/freezetag/freezetag.qc
qcsrc/common/gamemodes/gamemode/keepaway/keepaway.qc
qcsrc/common/mapobjects/models.qh
qcsrc/common/mapobjects/trigger/jumppads.qh
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qh
qcsrc/common/physics/player.qc
qcsrc/common/physics/player.qh
qcsrc/common/playerstats.qc
qcsrc/common/playerstats.qh
qcsrc/common/t_items.qc
qcsrc/common/t_items.qh
qcsrc/common/teams.qh
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/menu/command/menu_cmd.qc
qcsrc/menu/item/listbox.qc
qcsrc/menu/xonotic/campaign.qc
qcsrc/menu/xonotic/demolist.qc
qcsrc/menu/xonotic/gametypelist.qc
qcsrc/menu/xonotic/hudskinlist.qc
qcsrc/menu/xonotic/maplist.qc
qcsrc/menu/xonotic/playerlist.qc
qcsrc/menu/xonotic/playlist.qc
qcsrc/menu/xonotic/screenshotlist.qc
qcsrc/menu/xonotic/skinlist.qc
qcsrc/menu/xonotic/soundlist.qc
qcsrc/menu/xonotic/statslist.qc
qcsrc/server/bot/default/bot.qh
qcsrc/server/bot/default/waypoints.qc
qcsrc/server/bot/default/waypoints.qh
qcsrc/server/cheats.qc
qcsrc/server/command/banning.qc
qcsrc/server/command/banning.qh
qcsrc/server/command/cmd.qc
qcsrc/server/command/common.qc
qcsrc/server/command/common.qh
qcsrc/server/command/radarmap.qc
qcsrc/server/command/radarmap.qh
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/command/vote.qh
qcsrc/server/defs.qh
qcsrc/server/g_damage.qh
qcsrc/server/ipban.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/miscfunctions.qh
qcsrc/server/player.qh
qcsrc/server/round_handler.qc
qcsrc/server/round_handler.qh
xonotic-client.cfg

index 5cac3f8c08dc965f771822bd809b4b3bc23354fb..9c189f0138e25ee4394c9d91a5ccaf56a7fad524 100644 (file)
@@ -29,7 +29,7 @@ test_sv_game:
     - wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
     - wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
     - make
-    - EXPECT=7b0c010fc46bd46c70223fdf25f91c9c
+    - EXPECT=dadf46a9a22616987f627eabac8e747b
     - HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
       | tee /dev/stderr
       | grep '^:'
index b2edf84788332b7da31d681a318c19d6fd2e807d..3e5e78e0ef5d5581404ff021824f3bb741013776 100644 (file)
@@ -40,6 +40,7 @@ if_client    "alias" help "cl_cmd help; cmd help"
 // networked/server common commands
 alias cvar_changes         "qc_cmd_svcmd  cvar_changes         ${* ?}" // Prints a list of all changed server cvars
 alias cvar_purechanges     "qc_cmd_svcmd  cvar_purechanges     ${* ?}" // Prints a list of all changed gameplay cvars
+alias editmob              "qc_cmd_svcmd  editmob              ${* ?}" // Modifies a monster or all monsters
 alias info                 "qc_cmd_svcmd  info                 ${* ?}" // Request for unique server information set up by admin
 alias ladder               "qc_cmd_svcmd  ladder               ${* ?}" // Get information about top players if supported
 alias lsmaps               "qc_cmd_svcmd  lsmaps               ${* ?}" // List maps which can be used with the current game mode
@@ -55,16 +56,26 @@ alias who                  "qc_cmd_svcmd  who                  ${* ?}" // Displa
 
 // generic commands (across all programs)
 alias addtolist            "qc_cmd_svmenu addtolist            ${* ?}" // Add a string to a cvar
+alias bufstr_get           "qc_cmd_svmenu bufstr_get           ${* ?}" // Examine a string buffer object
+alias cvar_localchanges    "qc_cmd_svmenu cvar_localchanges    ${* ?}" // Print locally changed cvars
 alias dumpcommands         "qc_cmd_svmenu dumpcommands         ${* ?}" // Dump all commands on the program to *_cmd_dump.txt
-alias dumpnotifs           "qc_cmd_svcl   dumpnotifs           ${* ?}" // Dump all notifications into notifications_dump.txt
+alias dumpnotifs           "qc_cmd_svmenu dumpnotifs           ${* ?}" // Dump all notifications into notifications_dump.txt
+alias dumpitems            "qc_cmd_svmenu dumpitems            ${* ?}" // Dump all items to the console
+alias dumpturrets          "qc_cmd_svmenu dumpturrets          ${* ?}" // Dump all turrets into turrets_dump.txt
+alias dumpweapons          "qc_cmd_svmenu dumpweapons          ${* ?}" // Dump all weapons into weapons_dump.txt
+alias find                 "qc_cmd_svmenu find                 ${* ?}" // Search through entities for matching classname
+alias findat               "qc_cmd_svmenu findat               ${* ?}" // Search through entities for matching origin
 alias maplist              "qc_cmd_svmenu maplist              ${* ?}" // Automatic control of maplist
+alias mx                   "qc_cmd_svmenu mx                   ${* ?}" // Send a matrix command
 alias nextframe            "qc_cmd_svmenu nextframe            ${* ?}" // Execute the given command next frame of this VM
 alias qc_curl              "qc_cmd_svmenu qc_curl              ${* ?}" // Queries a URL
 alias removefromlist       "qc_cmd_svmenu removefromlist       ${* ?}" // Remove a string from a cvar
-alias restartnotifs        "qc_cmd_svcl   restartnotifs        ${* ?}" // Re-initialize all notifications
+alias restartnotifs        "qc_cmd_svmenu restartnotifs        ${* ?}" // Re-initialize all notifications
 alias rpn                  "qc_cmd_svmenu rpn                  ${* ?}" // RPN calculator
+alias runtest              "qc_cmd_svmenu runtest              ${* ?}" // Run unit tests
 //alias settemp            "qc_cmd_svmenu settemp              ${* ?}" // Temporarily set a value to a cvar which is restored later
 //alias settemp_restore    "qc_cmd_svmenu settemp_restore      ${* ?}" // Restore all cvars set by settemp command
+alias version              "qc_cmd_svmenu version              ${* ?}" // Print the current version
 
 // other aliases for common commands
 alias g_hitplots_add "qc_cmd_svmenu rpn /g_hitplots_individuals g_hitplots_individuals ${1 !} union def"
@@ -116,6 +127,7 @@ alias menu_loadmap_prepare "disconnect; wait; g_campaign 0; menu_cmd rpn /_menu_
 // ==========================================================
 // commented out commands are really only intended for internal use
 alias blurtest             "qc_cmd_cl     blurtest             ${* ?}" // Feature for testing blur postprocessing
+alias boxparticles         "qc_cmd_cl     boxparticles         ${* ?}" // Spawn particles manually
 alias create_scrshot_ent   "qc_cmd_cl     create_scrshot_ent   ${* ?}" // Create an entity at this location for automatic screenshots
 alias debugmodel           "qc_cmd_cl     debugmodel           ${* ?}" // Spawn a debug model manually
 //alias handlevote         "qc_cmd_cl     handlevote           ${* ?}" // System to handle selecting a vote or option
@@ -123,6 +135,8 @@ alias hud                  "qc_cmd_cl     hud                  ${* ?}" // Comman
 alias localprint           "qc_cmd_cl     localprint           ${* ?}" // Create your own centerprint sent to yourself
 //alias mv_download        "qc_cmd_cl     mv_download          ${* ?}" // Retrieve mapshot picture from the server
 alias sendcvar             "qc_cmd_cl     sendcvar             ${* ?}" // Send a cvar to the server (like weaponpriority)
+alias weapon_find          "qc_cmd_cl     weapon_find          ${* ?}" // Show spawn locations of a weapon
+
 alias exit                 "quit"
 
 // other aliases for local commands
@@ -147,17 +161,16 @@ seta cl_autoswitch 1 "automatically switch to newly picked up weapons if they ar
 // commented out commands are really only intended for internal use, or already have declaration in the engine
 alias autoswitch           "qc_cmd_cmd    autoswitch           ${* ?}" // Whether or not to switch automatically when getting a better weapon
 alias clientversion        "qc_cmd_cmd    clientversion        ${* ?}" // Release version of the game
-//alias mv_getpicture      "qc_cmd_cmd    mv_getpicture        ${* ?}" // Retrieve mapshot picture from the server
 alias join                 "qc_cmd_cmd    join                 ${* ?}" // Become a player in the game
+alias minigame             "qc_cmd_cmd    minigame             ${* ?}" // Start a minigame
+//alias mv_getpicture      "qc_cmd_cmd    mv_getpicture        ${* ?}" // Retrieve mapshot picture from the server
+alias physics              "qc_cmd_cmd    physics              ${* ?}" // Change physics set
 alias ready                "qc_cmd_cmd    ready                ${* ?}" // Qualify as ready to end warmup stage (or restart server if allowed)
-alias reportcvar           "qc_cmd_cmd    reportcvar           ${* ?}" // Old system for sending a client cvar to the server
 //alias say                "qc_cmd_cmd    say                  ${* ?}" // Print a message to chat to all players
 //alias say_team           "qc_cmd_cmd    say_team             ${* ?}" // Print a message to chat to all team mates
 alias selectteam           "qc_cmd_cmd    selectteam           ${* ?}" // Attempt to choose a team to join into
 alias selfstuff            "qc_cmd_cmd    selfstuff            ${* ?}" // Stuffcmd a command to your own client
 alias sentcvar             "qc_cmd_cmd    sentcvar             ${* ?}" // New system for sending a client cvar to the server
-alias editmob              "qc_cmd_cmd    editmob              ${* ?}" // Edit a monster's properties
-alias physics              "qc_cmd_cmd    physics              ${* ?}" // Change physics set
 alias spectate             "qc_cmd_cmd    spectate             ${* ?}" // Become an observer
 alias suggestmap           "qc_cmd_cmd    suggestmap           ${* ?}" // Suggest a map to the mapvote at match end
 //alias tell               "qc_cmd_cmd    tell                 ${* ?}" // Send a message directly to a player
@@ -194,6 +207,7 @@ alias mobbutcher "editmob butcher ${* ?}"
 alias adminmsg             "qc_cmd_sv     adminmsg             ${* ?}" // Send an admin message to a client directly
 alias allready             "qc_cmd_sv     allready             ${* ?}" // Restart the server and reset the players
 alias allspec              "qc_cmd_sv     allspec              ${* ?}" // Force all players to spectate
+alias animbench            "qc_cmd_sv     animbench            ${* ?}" // Benchmark model animation (LAGS)
 alias anticheat            "qc_cmd_sv     anticheat            ${* ?}" // Create an anticheat report for a client
 alias bbox                 "qc_cmd_sv     bbox                 ${* ?}" // Print detailed information about world size
 alias bot_cmd              "qc_cmd_sv     bot_cmd              ${* ?}" // Control and send commands to bots
@@ -204,7 +218,6 @@ alias defer_clear_all      "qc_cmd_sv     defer_clear_all      ${* ?}" // Clear
 alias delrec               "qc_cmd_sv     delrec               ${* ?}" // Delete race time record for a map
 alias effectindexdump      "qc_cmd_sv     effectindexdump      ${* ?}" // Dump list of effects from code and effectinfo.txt
 alias extendmatchtime      "qc_cmd_sv     extendmatchtime      ${* ?}" // Increase the timelimit value incrementally
-alias find                 "qc_cmd_sv     find                 ${* ?}" // Search through entities for matching classname
 alias gametype             "qc_cmd_sv     gametype             ${* ?}" // Simple command to change the active gametype
 alias gettaginfo           "qc_cmd_sv     gettaginfo           ${* ?}" // Get specific information about a weapon model
 alias gotomap              "qc_cmd_sv     gotomap              ${* ?}" // Simple command to switch to another map
index c36c3f5e7e587989e23d5d7db7b0e5039f216d75..cb0414cc1ea32fb1881fa8de3f13bbca501de60f 100644 (file)
Binary files a/gfx/hud/luma/weaponhmg.tga and b/gfx/hud/luma/weaponhmg.tga differ
index 643c5cafee679e92a84f4a60c28849cac75eb62e..74019d86f9ec8d079f59badbb83cd17a2afbd9b9 100644 (file)
Binary files a/gfx/hud/luma/weaponrpc.tga and b/gfx/hud/luma/weaponrpc.tga differ
index 8eb3ca1dcb1a623111fc2a7a095d31ff946ebdc0..9c63f431267b47977c5303182ca9600f22008c95 100644 (file)
@@ -39,13 +39,13 @@ float autocvar_cl_effects_lightningarc_drift_end;
 float autocvar_cl_effects_lightningarc_drift_start;
 float autocvar_cl_effects_lightningarc_segmentlength;
 bool autocvar_cl_effects_lightningarc_simple;
-int autocvar_cl_gentle;
+bool autocvar_cl_gentle;
 int autocvar_cl_gentle_damage;
 int autocvar_cl_gentle_gibs;
 int autocvar_cl_gentle_messages;
 float autocvar_cl_gibs_damageforcescale = 3.5;
 float autocvar_cl_gibs_lifetime = 14;
-float autocvar_cl_gibs_maxcount = 100;
+int autocvar_cl_gibs_maxcount = 100;
 bool autocvar_cl_gibs_sloppy = 1;
 float autocvar_cl_gibs_ticrate = 0.1;
 float autocvar_cl_gibs_velocity_random = 1;
@@ -395,12 +395,12 @@ string autocvar_hud_skin;
 float autocvar_menu_mouse_speed;
 string autocvar_menu_skin;
 int autocvar_r_fakelight;
-int autocvar_r_fullbright;
+bool autocvar_r_fullbright;
 float autocvar_r_letterbox;
 string autocvar_scoreboard_columns;
 bool autocvar_v_flipped;
-float autocvar_vid_conheight;
-float autocvar_vid_conwidth;
+int autocvar_vid_conheight;
+int autocvar_vid_conwidth;
 float autocvar_vid_pixelheight;
 float autocvar_viewsize;
 bool autocvar_cl_eventchase_vehicle = 1;
index 9a5335eff06b7c4ca56a73b17d3324b2a2b9618e..22cbc1a2df32b072905fa8ce9caee5de4f256dc4 100644 (file)
@@ -5,7 +5,7 @@
 float          scoreboard_showscores;
 float          scoreboard_showaccuracy;
 .string                message;
-.int           renderflags;
+.float         renderflags;
 // float               coop;
 // float               deathmatch;
 
@@ -16,7 +16,6 @@ float         dmg_take;
 // Darkplaces Render Modifications
 #if 0
 .float alpha;
-.float renderflags;
 .vector colormod;
 .float scale;
 #endif
index 98b15ee9537257443d0a19d06dba2beed6ce4c4a..e7e3c6d65241b9b7a207faa2aedcaa9603ac4009 100644 (file)
@@ -105,7 +105,7 @@ bool QuickMenu_Open(string mode, string submenu, string file)
                while((s = fgets(fh)) && QuickMenu_Buffer_Size < QUICKMENU_BUFFER_MAXENTRIES)
                {
                        // first skip invalid entries, so we don't check them anymore
-                       float argc;
+                       int argc;
                        argc = tokenize_console(s);
                        if(argc == 0 || argv(0) == "")
                                continue;
index a560b74c74ab616e33fc4ac497741a6e22cf4f48..b2bda4829e1084b71652488f78b1444ca10b203e 100644 (file)
@@ -4,7 +4,7 @@
 bool scoreboard_active;
 float scoreboard_fade_alpha;
 
-void Cmd_Scoreboard_SetFields(float argc);
+void Cmd_Scoreboard_SetFields(int argc);
 void Scoreboard_Draw();
 void Scoreboard_InitScores();
 void Scoreboard_UpdatePlayerTeams();
index 863905a3d32fd4fb5ec1b4c9ae9e2d2dbf45df31..6844b1e078d7ad30380aae9913c1301832a5bc1d 100644 (file)
@@ -228,7 +228,7 @@ void Shutdown()
 }
 
 .float has_team;
-float SetTeam(entity o, int Team)
+bool SetTeam(entity o, int Team)
 {
        TC(int, Team);
        devassert_once(Team);
@@ -577,14 +577,14 @@ NET_HANDLE(ENT_CLIENT_NAGGER, bool isnew)
        {
                for(j = 0; j < maxclients; ++j)
                        if(playerslots[j])
-                               playerslots[j].ready = 1;
+                               playerslots[j].ready = true;
                for(i = 1; i <= maxclients; i += 8)
                {
                        f = ReadByte();
                        for(j = i-1, b = BIT(0); b < BIT(8); b <<= 1, ++j)
                                if (!(f & b))
                                        if(playerslots[j])
-                                               playerslots[j].ready = 0;
+                                               playerslots[j].ready = false;
                }
        }
 
@@ -605,7 +605,7 @@ NET_HANDLE(ENT_CLIENT_ELIMINATEDPLAYERS, bool isnew)
        if (sf & 1) {
                for (int j = 0; j < maxclients; ++j) {
                        if (playerslots[j]) {
-                               playerslots[j].eliminated = 1;
+                               playerslots[j].eliminated = true;
                        }
                }
                for (int i = 1; i <= maxclients; i += 8) {
@@ -615,7 +615,7 @@ NET_HANDLE(ENT_CLIENT_ELIMINATEDPLAYERS, bool isnew)
                                if (f & BIT(b)) continue;
                                int j = i - 1 + b;
                                if (playerslots[j]) {
-                                       playerslots[j].eliminated = 0;
+                                       playerslots[j].eliminated = false;
                                }
                        }
                }
index 69c3fa3d2b300eb4f54f6fd2a9bf4b8e68db62bf..8a0e78a0d8126fa7fa78fcca829a5c2af1b1f411 100644 (file)
@@ -9,7 +9,7 @@ vector mi_scale;
 // Minimap
 string minimapname;
 
-float postinit;
+bool postinit;
 entity gametype;
 
 float FONT_USER = 8;
@@ -27,7 +27,7 @@ void Ent_Remove(entity this);
 
 void Gamemode_Init();
 
-float SetTeam(entity pl, float Team);
+bool SetTeam(entity pl, int Team);
 
 vector hud_fontsize;
 
@@ -38,10 +38,10 @@ float grecordtime[RANKINGS_CNT];
 
 entity playerslots[255]; // 255 is engine limit on maxclients
 entity teamslots[17];    // 17 teams (including "spectator team")
-.float gotscores;
+.bool gotscores;
 .entity owner;
-.float ready;
-.float eliminated;
+.bool ready;
+.bool eliminated;
 
 .void(entity) draw;
 IntrusiveList g_drawables;
@@ -64,7 +64,7 @@ bool button_attack2;
 
 float current_viewzoom;
 float zoomin_effect;
-float warmup_stage;
+bool warmup_stage;
 
 void Fog_Force();
 
@@ -73,15 +73,16 @@ string _getcommandkey(string text, string command, bool forcename);
 #define getcommandkey_forcename(cmd_name, command) _getcommandkey(cmd_name, command, true)
 
 string vote_called_vote;
-float ready_waiting;
-float ready_waiting_for_me;
-float vote_waiting;
-float vote_waiting_for_me;
+bool ready_waiting;
+bool ready_waiting_for_me;
+bool vote_waiting;
+bool vote_waiting_for_me;
 
 float current_zoomfraction;
 
-float cs_project_is_b0rked;
-float vid_width, vid_height, vid_pixelheight;
+int cs_project_is_b0rked;
+int vid_width, vid_height;
+float vid_pixelheight;
 
 float camera_active;           // Demo camera is active if set to true
 float chase_active_backup;
index 2f95102a990bf84571b8010cff9b55c674991dca..8a6f542a0a597277cb598b45dff23f335f2ae824 100644 (file)
@@ -3,7 +3,7 @@
 #include <common/constants.qh>
 void MapVote_Draw();
 
-void Cmd_MapVote_MapDownload(float argc);
+void Cmd_MapVote_MapDownload(int argc);
 
 float MapVote_InputEvent(float bInputType, float nPrimary, float nSecondary);
 
index 3bdc8725c2803b5c9c27f6f0f30c9841d6ea8294..25c008d260d12329b2e16aed6dfdf97fdaf0973d 100644 (file)
@@ -29,4 +29,4 @@ void CampaignFile_Unload();
 
 // Sets up the campaign for the n-th array item (meaning: campaign_offset+nth
 // level) using localcmd()
-void CampaignSetup(float n);
+void CampaignSetup(int n);
index c58a3df75a50d83e55731bc5955020f999781007..08c20072c7daefef87349b840e62b843b8ae54eb 100644 (file)
@@ -57,7 +57,7 @@ void Curl_URI_Get_Callback(int id, float status, string data)
 //  Command Sub-Functions
 // =======================
 
-void GenericCommand_addtolist(float request, float argc)
+void GenericCommand_addtolist(int request, int argc)
 {
        switch(request)
        {
@@ -97,7 +97,7 @@ void GenericCommand_addtolist(float request, float argc)
        }
 }
 
-void GenericCommand_qc_curl(float request, float argc)
+void GenericCommand_qc_curl(int request, int argc)
 {
        switch(request)
        {
@@ -169,7 +169,7 @@ void GenericCommand_qc_curl(float request, float argc)
        }
 }
 
-GENERIC_COMMAND(dumpcommands, "Dump all commands on the program to *_cmd_dump.txt")
+GENERIC_COMMAND(dumpcommands, "Dump all commands on the program to <program>_cmd_dump.txt")
 {
        switch(request)
        {
@@ -184,23 +184,28 @@ GENERIC_COMMAND(dumpcommands, "Dump all commands on the program to *_cmd_dump.tx
                                #ifdef SVQC
                                        CMD_Write("dump of server console commands:\n");
                                        GameCommand_macro_write_aliases(fh);
+                                       CMD_Write("\n");
 
-                                       CMD_Write("\ndump of networked client only commands:\n");
+                                       CMD_Write("dump of networked client only commands:\n");
                                        ClientCommand_macro_write_aliases(fh);
+                                       CMD_Write("\n");
 
-                                       CMD_Write("\ndump of common commands:\n");
+                                       CMD_Write("dump of common commands:\n");
                                        CommonCommand_macro_write_aliases(fh);
+                                       CMD_Write("\n");
 
-                                       CMD_Write("\ndump of ban commands:\n");
+                                       CMD_Write("dump of ban commands:\n");
                                        BanCommand_macro_write_aliases(fh);
+                                       CMD_Write("\n");
                                #endif
 
                                #ifdef CSQC
                                        CMD_Write("dump of client commands:\n");
                                        LocalCommand_macro_write_aliases(fh);
+                                       CMD_Write("\n");
                                #endif
 
-                               CMD_Write("\ndump of generic commands:\n");
+                               CMD_Write("dump of generic commands:\n");
                                GenericCommand_macro_write_aliases(fh);
 
                                LOG_INFO("Completed dump of aliases in ^2data/data/", GetProgramCommandPrefix(), "_dump.txt^7.");
@@ -224,7 +229,7 @@ GENERIC_COMMAND(dumpcommands, "Dump all commands on the program to *_cmd_dump.tx
        }
 }
 
-void GenericCommand_maplist(float request, float argc)
+void GenericCommand_maplist(int request, int argc)
 {
        switch(request)
        {
@@ -307,7 +312,7 @@ void GenericCommand_maplist(float request, float argc)
        }
 }
 
-void GenericCommand_nextframe(float request, float arguments, string command)
+void GenericCommand_nextframe(int request, float arguments, string command)
 {
        switch(request)
        {
@@ -327,7 +332,7 @@ void GenericCommand_nextframe(float request, float arguments, string command)
        }
 }
 
-void GenericCommand_removefromlist(float request, float argc)
+void GenericCommand_removefromlist(int request, int argc)
 {
        switch(request)
        {
@@ -362,7 +367,7 @@ void GenericCommand_removefromlist(float request, float argc)
        }
 }
 
-void GenericCommand_restartnotifs(float request)
+void GenericCommand_restartnotifs(int request)
 {
        switch(request)
        {
@@ -410,7 +415,7 @@ void GenericCommand_restartnotifs(float request)
        }
 }
 
-void GenericCommand_settemp(float request, float argc)
+void GenericCommand_settemp(int request, int argc)
 {
        switch(request)
        {
@@ -441,7 +446,7 @@ void GenericCommand_settemp(float request, float argc)
        }
 }
 
-void GenericCommand_settemp_restore(float request, float argc)
+void GenericCommand_settemp_restore(int request, int argc)
 {
        switch(request)
        {
@@ -468,7 +473,7 @@ void GenericCommand_settemp_restore(float request, float argc)
        }
 }
 
-void GenericCommand_runtest(float request, float argc)
+void GenericCommand_runtest(int request, int argc)
 {
        switch(request)
        {
@@ -496,7 +501,7 @@ void GenericCommand_runtest(float request, float argc)
 
 /* use this when creating a new command, making sure to place it in alphabetical order... also,
 ** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void GenericCommand_(float request)
+void GenericCommand_(int request)
 {
        switch(request)
        {
@@ -534,7 +539,7 @@ void GenericCommand_macro_help()
        FOREACH(GENERIC_COMMANDS, true, LOG_INFOF("  ^2%s^7: %s", it.m_name, it.m_description));
 }
 
-float GenericCommand_macro_command(float argc, string command)
+float GenericCommand_macro_command(int argc, string command)
 {
        string c = strtolower(argv(0));
        FOREACH(GENERIC_COMMANDS, it.m_name == c, {
@@ -544,7 +549,7 @@ float GenericCommand_macro_command(float argc, string command)
        return false;
 }
 
-float GenericCommand_macro_usage(float argc)
+float GenericCommand_macro_usage(int argc)
 {
        string c = strtolower(argv(1));
        FOREACH(GENERIC_COMMANDS, it.m_name == c, {
@@ -567,7 +572,7 @@ void GenericCommand_macro_write_aliases(float fh)
 
 float GenericCommand(string command)
 {
-       float argc = tokenize_console(command);
+       int argc = tokenize_console(command);
        float n, j, f, i;
        string s, s2, c;
        vector rgb;
index b39c79901457de6a77b18d42ed93ac5113d71d61..68aa0ae88af0d1b0b1deafc9eee5f46735da808a 100644 (file)
@@ -9,9 +9,9 @@
 
 void GenericCommand_macro_help();
 
-float GenericCommand_macro_command(float argc, string command);
+float GenericCommand_macro_command(int argc, string command);
 
-float GenericCommand_macro_usage(float argc);
+float GenericCommand_macro_usage(int argc);
 
 void GenericCommand_macro_write_aliases(float fh);
 
index 7e1c4f52eb2879e58f47328c9402f33879398cd5..0998fad9dbd4ea4ea02ed815840ff18a8b3f548f 100644 (file)
@@ -53,7 +53,7 @@ float rpn_popf() { return stof(rpn_pop()); }
 void rpn_pushf(float f) { return rpn_push(sprintf("%.9g", f)); }
 void rpn_setf(float f) { return rpn_set(sprintf("%.9g", f)); }
 
-void GenericCommand_rpn(float request, float argc, string command)
+void GenericCommand_rpn(int request, int argc, string command)
 {
        switch(request)
        {
index ba028e248431806131679777bf116d8430d4f07a..75f5ba65d88ce2f06682fdce971dbd4671cda72d 100644 (file)
@@ -11,4 +11,4 @@ int rpn_error;
 int rpn_sp;
 string rpn_stack[MAX_RPN_STACK];
 
-void GenericCommand_rpn(float request, float argc, string command);
+void GenericCommand_rpn(int request, int argc, string command);
index 41c5d3017eada07992e8ba6ae102827da85525d4..b1dea6dcc431a84c1063d36f567047222c3d530c 100644 (file)
@@ -292,7 +292,7 @@ MUTATOR_HOOKFUNCTION(trace, SV_StartFrame)
                it.debug_trace_button = btn;
                if (!btn || skip) continue;
                FOREACH_ENTITY(true, {
-                   it.solid_prev = it.solid;
+                       it.solid_prev = it.solid;
                        it.solid = SOLID_BBOX;
                });
                vector forward = '0 0 0'; vector right = '0 0 0'; vector up = '0 0 0';
@@ -300,8 +300,8 @@ MUTATOR_HOOKFUNCTION(trace, SV_StartFrame)
                vector pos = it.origin + it.view_ofs;
                traceline(pos, pos + forward * max_shot_distance, MOVE_NORMAL, it);
                FOREACH_ENTITY(true, {
-                   it.solid = it.solid_prev;
-            it.solid_prev = 0;
+                       it.solid = it.solid_prev;
+                       it.solid_prev = 0;
                });
                entity e = trace_ent;
                int i = etof(e);
index 812d5da4ec0321625d09484e9f38daee27533a57..0c43d81e4070d556e35164bf9f0fb97d95a624c7 100644 (file)
@@ -1243,7 +1243,7 @@ void ctf_FlagSetup(int teamnumber, entity flag) // called when spawning a flag e
        flag.netname = strzone(sprintf("%s%s^7 flag", Team_ColorCode(teamnumber), Team_ColorName_Upper(teamnumber)));
        flag.team = teamnumber;
        flag.classname = "item_flag_team";
-       flag.target = "###item###"; // wut?
+       flag.target = "###item###"; // for finding the nearest item using findnearest
        flag.flags = FL_ITEM | FL_NOTARGET;
        IL_PUSH(g_items, flag);
        flag.solid = SOLID_TRIGGER;
index 0cea02f2f2aef7325b0c7dc64a5bf13c1573cea2..218bb63423bc8da5caa53fa288deb311802255f9 100644 (file)
@@ -346,7 +346,7 @@ int Domination_GetWinnerTeam()
        return -1; // no control points left?
 }
 
-float Domination_CheckWinner()
+bool Domination_CheckWinner()
 {
        if(round_handler_GetEndTime() > 0 && round_handler_GetEndTime() - time <= 0)
        {
@@ -355,7 +355,7 @@ float Domination_CheckWinner()
 
                game_stopped = true;
                round_handler_Init(5, autocvar_g_domination_warmup, autocvar_g_domination_round_timelimit);
-               return 1;
+               return true;
        }
 
        Domination_count_controlpoints();
@@ -363,7 +363,7 @@ float Domination_CheckWinner()
        float winner_team = Domination_GetWinnerTeam();
 
        if(winner_team == -1)
-               return 0;
+               return false;
 
        if(winner_team > 0)
        {
@@ -380,12 +380,12 @@ float Domination_CheckWinner()
        game_stopped = true;
        round_handler_Init(5, autocvar_g_domination_warmup, autocvar_g_domination_round_timelimit);
 
-       return 1;
+       return true;
 }
 
-float Domination_CheckPlayers()
+bool Domination_CheckPlayers()
 {
-       return 1;
+       return true;
 }
 
 void Domination_RoundStart()
index 15726ada31d03b5442b12e15e175d34533af9768..013801a4cd3eeb006f349cce3f6ff66bac2a471f 100644 (file)
@@ -49,7 +49,7 @@ void freezetag_count_alive_players()
 
 #define FREEZETAG_ALIVE_TEAMS_OK() (Team_GetNumberOfAliveTeams() == NumTeams(freezetag_teams))
 
-float freezetag_CheckTeams()
+bool freezetag_CheckTeams()
 {
        static float prev_missing_teams_mask;
        if(FREEZETAG_ALIVE_TEAMS_OK())
@@ -57,14 +57,14 @@ float freezetag_CheckTeams()
                if(prev_missing_teams_mask > 0)
                        Kill_Notification(NOTIF_ALL, NULL, MSG_CENTER, CPID_MISSING_TEAMS);
                prev_missing_teams_mask = -1;
-               return 1;
+               return true;
        }
        if(total_players == 0)
        {
                if(prev_missing_teams_mask > 0)
                        Kill_Notification(NOTIF_ALL, NULL, MSG_CENTER, CPID_MISSING_TEAMS);
                prev_missing_teams_mask = -1;
-               return 0;
+               return false;
        }
        int missing_teams_mask = 0;
        for (int i = 1; i <= NUM_TEAMS; ++i)
@@ -80,7 +80,7 @@ float freezetag_CheckTeams()
                Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_MISSING_TEAMS, missing_teams_mask);
                prev_missing_teams_mask = missing_teams_mask;
        }
-       return 0;
+       return false;
 }
 
 int freezetag_getWinnerTeam()
@@ -111,7 +111,7 @@ int freezetag_getWinnerTeam()
 void nades_Clear(entity);
 void nades_GiveBonus(entity player, float score);
 
-float freezetag_CheckWinner()
+bool freezetag_CheckWinner()
 {
        if(round_handler_GetEndTime() > 0 && round_handler_GetEndTime() - time <= 0)
        {
@@ -123,12 +123,12 @@ float freezetag_CheckWinner()
                });
                game_stopped = true;
                round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
-               return 1;
+               return true;
        }
 
        if (Team_GetNumberOfAliveTeams() > 1)
        {
-               return 0;
+               return false;
        }
 
        int winner_team = freezetag_getWinnerTeam();
@@ -151,7 +151,7 @@ float freezetag_CheckWinner()
 
        game_stopped = true;
        round_handler_Init(5, autocvar_g_freezetag_warmup, autocvar_g_freezetag_round_timelimit);
-       return 1;
+       return true;
 }
 
 entity freezetag_LastPlayerForTeam(entity this)
@@ -214,7 +214,7 @@ void freezetag_Freeze(entity targ, entity attacker)
        freezetag_Add_Score(targ, attacker);
 }
 
-float freezetag_isEliminated(entity e)
+bool freezetag_isEliminated(entity e)
 {
        if(IS_PLAYER(e) && (STAT(FROZEN, e) == 1 || IS_DEAD(e)))
                return true;
index c8bfbf25ae8513550434de0d0f21b0144afeb79e..48ab656c093754056978d89d06d5f516efe84420 100644 (file)
@@ -89,8 +89,9 @@ void ka_TimeScoring(entity this)
 
 void ka_TouchEvent(entity this, entity toucher) // runs any time that the ball comes in contact with something
 {
-       if(game_stopped) return;
-       if(!this) return;
+       if (!this || game_stopped || time < game_starttime)
+               return;
+
        if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
        { // The ball fell off the map, respawn it since players can't get to it
                ka_RespawnBall(this);
index 50170e251b5fb8cb518fe24e7fe1fbd22b08f34a..45346dc8ea70440affb817baa6e4ddd8e5888f5e 100644 (file)
@@ -9,7 +9,7 @@ classfield(Wall) .float loddistance1, loddistance2;
 classfield(Wall) .vector saved;
 
 // Needed for interactive clientwalls
-.float inactive; // Clientwall disappears when inactive
+.bool inactive; // Clientwall disappears when inactive
 .float alpha_max, alpha_min;
 // If fade_start > fade_end, fadeout will be inverted
 // fade_vertical_offset is a vertival offset for player position
index cd6adec310ccf2c00b974f92329f519f0561b45e..268134e806757aa4f459295ad818bb4a8db013bc 100644 (file)
@@ -8,7 +8,7 @@ IntrusiveList g_jumppads;
 STATIC_INIT(g_jumppads) { g_jumppads = IL_NEW(); }
 
 .float pushltime;
-.float istypefrag;
+.bool istypefrag;
 .float height;
 
 const int NUM_JUMPPADSUSED = 3;
index dcbb65f65cd29472659141b93617b7a8182c2075..66904d0070bd879fd151e14be11df995600a3e43 100644 (file)
@@ -552,11 +552,13 @@ void Draw_WaypointSprite(entity this)
         LOG_INFOF("WARNING: sprite of name %s has no color, using pink so you notice it", spriteimage);
     }
 
-    if (time - floor(time) > 0.5)
+    float health_val = GetResourceAmount(this, RESOURCE_HEALTH);
+    float blink_time = (health_val >= 0) ? (health_val * 10) : time;
+    if (blink_time - floor(blink_time) > 0.5)
     {
         if (this.helpme && time < this.helpme)
             a *= SPRITE_HELPME_BLINK;
-        else if (this.lifetime > 0) // fading out waypoints don't blink
+        else if (!this.lifetime) // fading out waypoints don't blink
             a *= spritelookupblinkvalue(this, spriteimage);
     }
 
@@ -590,7 +592,7 @@ void Draw_WaypointSprite(entity this)
             ang += M_PI;
 
                float f1 = d.x / vid_conwidth;
-               float f2 = d.y / vid_conheight; 
+               float f2 = d.y / vid_conheight;
                if (f1 == 0) { f1 = 0.000001; }
                if (f2 == 0) { f2 = 0.000001; }
 
@@ -1101,7 +1103,7 @@ entity WaypointSprite_SpawnFixed(
 
 entity WaypointSprite_DeployFixed(
     entity spr,
-    float limited_range,
+    bool limited_range,
     entity player,
     vector ofs,
     entity icon // initial icon
@@ -1133,7 +1135,7 @@ entity WaypointSprite_DeployPersonal(
 entity WaypointSprite_Attach(
     entity spr,
     entity player,
-    float limited_range,
+    bool limited_range,
     entity icon // initial icon
 )
 {
index 94d735a1f6096b2f3a77a0b712e4124912bb0aa3..9bfa4862befc03fb6e9a7f8d9184787922b89e7c 100644 (file)
@@ -203,7 +203,7 @@ entity WaypointSprite_SpawnFixed(
 .entity waypointsprite_deployed_fixed;
 entity WaypointSprite_DeployFixed(
     entity spr,
-    float limited_range,
+    bool limited_range,
     entity player,
     vector ofs,
     entity icon // initial icon
@@ -222,7 +222,7 @@ entity WaypointSprite_DeployPersonal(
 entity WaypointSprite_Attach(
     entity spr,
     entity player,
-    float limited_range,
+    bool limited_range,
     entity icon // initial icon
 );
 
index 2f4ebb1ff002c9c37278901d70a4838bb0e043e1..f6ab29715a298c07a7bc9c317d0a69d4d9636298 100644 (file)
@@ -809,7 +809,8 @@ bool IsFlying(entity this)
                return false;
        if(this.waterlevel >= WATERLEVEL_SWIMMING)
                return false;
-       traceline(this.origin, this.origin - '0 0 48', MOVE_NORMAL, this);
+       tracebox(this.origin, this.mins, this.maxs, this.origin - '0 0 24', MOVE_NORMAL, this);
+       //traceline(this.origin, this.origin - '0 0 48', MOVE_NORMAL, this);
        if(trace_fraction < 1)
                return false;
        return true;
index da48fa698c2086e34049c7fc1ffeb0f9599d5a87..478789dc2e784d51d708382273ac1a106f84a5da 100644 (file)
@@ -15,7 +15,7 @@
 .float swamp_slowdown;
 .float lastflags;
 .float lastground;
-.float wasFlying;
+.bool wasFlying;
 
 .int buttons_old;
 .vector movement_old;
index cde6a519028093268ef95fc568e91184a40d3368..869af4da96533bb90f31f382b35ef0b3ac243a43 100644 (file)
@@ -55,7 +55,7 @@ void PlayerStats_GameReport_AddPlayer(entity e)
        }
 }
 
-void PlayerStats_GameReport_AddTeam(float t)
+void PlayerStats_GameReport_AddTeam(int t)
 {
        if(PS_GR_OUT_DB < 0) { return; }
 
@@ -157,7 +157,7 @@ void PlayerStats_GameReport_FinalizePlayer(entity p)
        strfree(p.playerstats_id);
 }
 
-void PlayerStats_GameReport(float finished)
+void PlayerStats_GameReport(bool finished)
 {
        if(PS_GR_OUT_DB < 0) { return; }
 
index 28f985e27d24a214afc7519a956f70dd79526cef..d27dd0ed1f775038bb904e57327876a84d45314d 100644 (file)
@@ -54,7 +54,7 @@ const string PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD = "achievement-firstblood";
 const string PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM = "achievement-firstvictim";
 
 // delay map switch until this is set
-float PlayerStats_GameReport_DelayMapVote;
+bool PlayerStats_GameReport_DelayMapVote;
 
 // call at initialization
 void PlayerStats_GameReport_Init();
index 28ea1add9f998c8b52f9f463d6e7ca8bc73f50d2..0d4d2b92ab2c7221621379a5bf0b77b2d0730146 100644 (file)
@@ -402,7 +402,7 @@ bool have_pickup_item(entity this)
        return true;
 }
 
-void Item_Show (entity e, float mode)
+void Item_Show (entity e, int mode)
 {
        e.effects &= ~(EF_ADDITIVE | EF_STARDUST | EF_FULLBRIGHT | EF_NODEPTHTEST);
        e.ItemStatus &= ~ITS_STAYWEP;
@@ -1317,7 +1317,7 @@ void _StartItem(entity this, entity def, float defaultrespawntime, float default
                        || (def.instanceOfHealth && def != ITEM_HealthSmall)
                        || (def.instanceOfArmor && def != ITEM_ArmorSmall)
                        || (itemid & (IT_KEY1 | IT_KEY2))
-               ) this.target = "###item###"; // for finding the nearest item using find()
+               ) this.target = "###item###"; // for finding the nearest item using findnearest
 
                Item_ItemsTime_SetTime(this, 0);
        }
index 9fdb0b0925798580c57106a7eb598c24e3a5ad41..4d3f45380069e9cd6fe397265e2c98291d2132ad 100644 (file)
@@ -62,7 +62,7 @@ const float ITEM_RESPAWN_TICKS = 10;
 
 .float item_respawncounter;
 
-void Item_Show (entity e, float mode);
+void Item_Show (entity e, int mode);
 
 void Item_Respawn (entity this);
 
@@ -107,7 +107,7 @@ float weapon_pickupevalfunc(entity player, entity item);
 float ammo_pickupevalfunc(entity player, entity item);
 float healtharmor_pickupevalfunc(entity player, entity item);
 
-.float is_item;
+.bool is_item;
 .entity itemdef;
 void _StartItem(entity this, entity def, float defaultrespawntime, float defaultrespawntimejitter);
 
index 1a2e1b1766febc7cb404dbe5e02f03bf1b2a7e71..62bb2db7cdda28a8e6e63da5cf6024e59f570a3e 100644 (file)
@@ -56,11 +56,11 @@ const string STATIC_NAME_TEAM_3 = "Yellow";
 const string STATIC_NAME_TEAM_4 = "Pink";
 
 #ifdef CSQC
-float teamplay;
-float myteam;
+bool teamplay;
+int myteam;
 #endif
 
-string Team_ColorCode(float teamid)
+string Team_ColorCode(int teamid)
 {
        switch(teamid)
        {
@@ -73,7 +73,7 @@ string Team_ColorCode(float teamid)
        return "^7";
 }
 
-vector Team_ColorRGB(float teamid)
+vector Team_ColorRGB(int teamid)
 {
        switch(teamid)
        {
@@ -86,7 +86,7 @@ vector Team_ColorRGB(float teamid)
     return '0 0 0';
 }
 
-string Team_ColorName(float teamid)
+string Team_ColorName(int teamid)
 {
        switch(teamid)
        {
@@ -100,7 +100,7 @@ string Team_ColorName(float teamid)
 }
 
 // used for replacement in filenames or such where the name CANNOT be allowed to be translated
-string Static_Team_ColorName(float teamid)
+string Static_Team_ColorName(int teamid)
 {
        switch(teamid)
        {
index 03855e316e7c1c9f4be758095ad057c06fa5c835..861def9c733a12562f001c710e1c2cad254bc664 100644 (file)
@@ -257,6 +257,8 @@ void W_Hagar_Attack2_Load(Weapon thiswep, entity actor, .entity weaponentity)
        // loadable hagar secondary attack, must always run each frame
        if(time < game_starttime || time < actor.race_penalty || timeout_status == TIMEOUT_ACTIVE)
                return;
+       if (round_handler_IsActive() && !round_handler_IsRoundStarted())
+               return;
 
        bool loaded = actor.(weaponentity).hagar_load >= WEP_CVAR_SEC(hagar, load_max);
 
index bd45230c97ab61964f43a7153d69242fb896e38c..a06ac8e23100f7ffbc98312edba482164aec1c77 100644 (file)
@@ -49,6 +49,7 @@ void GameCommand(string theCommand)
                LOG_INFO(_("  sync - reloads all cvars on the current menu page"));
                LOG_INFO(_("  directmenu ITEM - select a menu item as main item"));
                LOG_INFO(_("  dumptree - dump the state of the menu as a tree to the console"));
+               LOG_INFO("\n");
 
                LOG_INFO("Generic commands shared by all programs:");
                GenericCommand_macro_help();
index 97f08c98113e520e6d55457356befca52319f28b..c455d2f5ab6c30cd42eee4d01f8dc39edac24f1d 100644 (file)
                }
        }
        AUTOCVAR(menu_scroll_averaging_time, float, 0.16, "smooth scroll averaging time");
-// scroll faster while dragging the scrollbar
+       // scroll faster while dragging the scrollbar
        AUTOCVAR(menu_scroll_averaging_time_pressed, float, 0.06, "smooth scroll averaging time when dragging the scrollbar");
        void ListBox_draw(entity me)
        {
                if (me.scrollPos != me.scrollPosTarget)
                {
                        float averaging_time = (me.pressed == 1)
-                           ? autocvar_menu_scroll_averaging_time_pressed
+                               ? autocvar_menu_scroll_averaging_time_pressed
                                : autocvar_menu_scroll_averaging_time;
                        // this formula works with whatever framerate
                        float f = averaging_time ? exp(-frametime / averaging_time) : 0;
index 9f953f66f542f9a8b9238d65e813a6b5cdf777c7..90221cdf85a43e2731905fe35664ddd57e2440b5 100644 (file)
@@ -168,8 +168,10 @@ void XonoticCampaignList_resizeNotify(entity me, vector relOrigin, vector relSiz
        me.itemAbsSize = '0 0 0';
        SUPER(XonoticCampaignList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+       me.itemAbsSize.y = absSize.y * me.itemHeight;
+       me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+       me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+       me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
        me.realUpperMargin1 = 0.5 * me.realFontSize.y;
        me.realUpperMargin2 = me.realUpperMargin1 + 2 * me.realFontSize.y;
 
index 16d5370f5d7beeef0487001e7aae4c7ad76bb77c..0addd6cbedda7d2bc2f7402b3f9abff336cbfde6 100644 (file)
@@ -92,8 +92,10 @@ void XonoticDemoList_resizeNotify(entity me, vector relOrigin, vector relSize, v
        me.itemAbsSize = '0 0 0';
        SUPER(XonoticDemoList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+       me.itemAbsSize.y = absSize.y * me.itemHeight;
+       me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+       me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+       me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
        me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
 
        me.columnNameOrigin = me.realFontSize.x;
index a08e4dbbc5fa13dc4eb51680a1bb551a25780fc0..3703393789eaa1125b6777b170d470612f2bea75 100644 (file)
@@ -101,8 +101,10 @@ void XonoticGametypeList_resizeNotify(entity me, vector relOrigin, vector relSiz
        me.itemAbsSize = '0 0 0';
        SUPER(XonoticGametypeList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+       me.itemAbsSize.y = absSize.y * me.itemHeight;
+       me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+       me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+       me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
        me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
        me.columnIconOrigin = 0;
        me.columnIconSize = me.itemAbsSize.y / me.itemAbsSize.x;
index d97d7131a473b36c0a46e8935b1efba6078c51d9..92dee8d85ef3cea77a92dd4e30596852d925b3a9 100644 (file)
@@ -146,8 +146,10 @@ void XonoticHUDSkinList_resizeNotify(entity me, vector relOrigin, vector relSize
        me.itemAbsSize = '0 0 0';
        SUPER(XonoticHUDSkinList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+       me.itemAbsSize.y = absSize.y * me.itemHeight;
+       me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+       me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+       me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
        me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
 
        me.columnNameOrigin = me.realFontSize.x;
index 73ef8a32ae8cfd738852859b0ccb47fa5bf6bbd0..5184ee1fd546a0f90ad3838462a57c005b7b4a9e 100644 (file)
@@ -88,8 +88,10 @@ void XonoticMapList_resizeNotify(entity me, vector relOrigin, vector relSize, ve
        me.itemAbsSize = '0 0 0';
        SUPER(XonoticMapList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+       me.itemAbsSize.y = absSize.y * me.itemHeight;
+       me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+       me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+       me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
        me.realUpperMargin1 = 0.5 * (1 - 2.5 * me.realFontSize.y);
        me.realUpperMargin2 = me.realUpperMargin1 + 1.5 * me.realFontSize.y;
 
index c6033050ae6f45d9157b042039788773b67afa72..e90eef23d3a11d2c63a2aa33798f49522508a396 100644 (file)
@@ -61,8 +61,10 @@ void XonoticPlayerList_resizeNotify(entity me, vector relOrigin, vector relSize,
        me.itemAbsSize = '0 0 0';
        SUPER(XonoticPlayerList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+       me.itemAbsSize.y = absSize.y * me.itemHeight;
+       me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+       me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+       me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
        me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
 
        // this list does 1 char left and right margin
index c912ba3a72c49bf40ff49c24ee5eaa199a1efb5f..da5fd486eac5265c53a6ccf2b21b2bb291192b89 100644 (file)
@@ -19,8 +19,10 @@ void XonoticPlayList_resizeNotify(entity me, vector relOrigin, vector relSize, v
        me.itemAbsSize = '0 0 0';
        SUPER(XonoticPlayList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+       me.itemAbsSize.y = absSize.y * me.itemHeight;
+       me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+       me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+       me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
        me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
 
        me.columnNumberOrigin = 0;
index de0adc793815796c0e175f32bf1e6e473b2709e1..9f5ba787aae88c83af4a14b7e02dd0b2f367f5aa 100644 (file)
@@ -97,8 +97,10 @@ void XonoticScreenshotList_resizeNotify(entity me, vector relOrigin, vector relS
        me.itemAbsSize = '0 0 0';
        SUPER(XonoticScreenshotList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+       me.itemAbsSize.y = absSize.y * me.itemHeight;
+       me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+       me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+       me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
        me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
 
        me.columnNameOrigin = me.realFontSize.x;
index e72ca12e2409813c024fbca7dc98914a1c56da35..4683c45207a018753df987f7d26f1c98ceda86be 100644 (file)
@@ -111,8 +111,10 @@ void XonoticSkinList_resizeNotify(entity me, vector relOrigin, vector relSize, v
        me.itemAbsSize = '0 0 0';
        SUPER(XonoticSkinList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+       me.itemAbsSize.y = absSize.y * me.itemHeight;
+       me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+       me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+       me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
        me.realUpperMargin1 = 0.5 * (1 - 2.5 * me.realFontSize.y);
        me.realUpperMargin2 = me.realUpperMargin1 + 1.5 * me.realFontSize.y;
 
index 6d77e1adf929c1e94f2aa964c7edb7bff88837da..99094b0af2cb125550f23bf1bb6137faf8401ed3 100644 (file)
@@ -55,8 +55,10 @@ void XonoticSoundList_resizeNotify(entity me, vector relOrigin, vector relSize,
        me.itemAbsSize = '0 0 0';
        SUPER(XonoticSoundList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+       me.itemAbsSize.y = absSize.y * me.itemHeight;
+       me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+       me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+       me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
        me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
 
        me.columnNumberOrigin = 0;
index 401a6eadda0026b5f7e2b6533c40352c597961ea..2c600b6f5289e6d92a03569a0c2dabf03cab3ca7 100644 (file)
@@ -270,8 +270,10 @@ void XonoticStatsList_resizeNotify(entity me, vector relOrigin, vector relSize,
        me.itemAbsSize = '0 0 0';
        SUPER(XonoticStatsList).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
 
-       me.realFontSize_y = me.fontSize / (me.itemAbsSize_y = (absSize.y * me.itemHeight));
-       me.realFontSize_x = me.fontSize / (me.itemAbsSize_x = (absSize.x * (1 - me.controlWidth)));
+       me.itemAbsSize.y = absSize.y * me.itemHeight;
+       me.itemAbsSize.x = absSize.x * (1 - me.controlWidth);
+       me.realFontSize.y = me.fontSize / me.itemAbsSize.y;
+       me.realFontSize.x = me.fontSize / me.itemAbsSize.x;
        me.realUpperMargin = 0.5 * (1 - me.realFontSize.y);
 
 #if 0
index ca567181bb13fd29331a6dd4c10a37d65f2b2c56..c4da14a4beeb29c7474c273879b34abc1c8411de 100644 (file)
@@ -16,7 +16,7 @@ const int AI_STATUS_JETPACK_FLYING             = BIT(9);
 const int AI_STATUS_JETPACK_LANDING            = BIT(10);
 const int AI_STATUS_STUCK                      = BIT(11); // Cannot reach any goal
 
-.float isbot; // true if this client is actually a bot
+.bool isbot; // true if this client is actually a bot
 .int aistatus;
 
 // Skill system
index 674ab634a1c768889ff3ac4025ea07008221b813..bab99b30479e82bc61d90e4553335eb998e65647 100644 (file)
@@ -260,7 +260,7 @@ void waypoint_spawn_fromeditor(entity pl)
                {
                        vector item_org = (it.absmin + it.absmax) * 0.5;
                        item_org.z = it.absmin.z - PL_MIN_CONST.z;
-                       if(vlen(item_org - org) < 30)
+                       if (vlen(item_org - org) < 20)
                        {
                                org = item_org;
                                break;
@@ -293,7 +293,6 @@ void waypoint_spawn_fromeditor(entity pl)
 
 void waypoint_remove(entity wp)
 {
-       // tell all waypoints linked to wp that they need to relink
        IL_EACH(g_waypoints, it != wp,
        {
                if (waypoint_islinked(it, wp))
@@ -718,6 +717,7 @@ bool waypoint_load_links()
 
        bool parse_comments = true;
        float ver = 0;
+       string links_time = string_null;
 
        while ((s = fgets(file)))
        {
@@ -727,13 +727,18 @@ bool waypoint_load_links()
                        {
                                if(substring(s, 2, 17) == "WAYPOINT_VERSION ")
                                        ver = stof(substring(s, 19, -1));
+                               else if(substring(s, 2, 14) == "WAYPOINT_TIME ")
+                                       links_time = substring(s, 16, -1);
                                continue;
                        }
                        else
                        {
-                               if(ver < WAYPOINT_VERSION)
+                               if(ver < WAYPOINT_VERSION || links_time != waypoint_time)
                                {
-                                       LOG_TRACE("waypoint links for this map are outdated.");
+                                       if (links_time != waypoint_time)
+                                               LOG_TRACE("waypoint links for this map are not made for these waypoints.");
+                                       else
+                                               LOG_TRACE("waypoint links for this map are outdated.");
                                        if (g_assault)
                                        {
                                                LOG_TRACE("Assault waypoint links need to be manually updated in the editor");
@@ -996,6 +1001,8 @@ void waypoint_save_links()
        }
 
        fputs(file, strcat("//", "WAYPOINT_VERSION ", ftos_decimals(WAYPOINT_VERSION, 2), "\n"));
+       if (waypoint_time != "")
+               fputs(file, strcat("//", "WAYPOINT_TIME ", waypoint_time, "\n"));
 
        int c = 0;
        IL_EACH(g_waypoints, true,
@@ -1063,7 +1070,12 @@ void waypoint_saveall()
        // (they are read as a waypoint with origin '0 0 0' and flag 0 though)
        fputs(file, strcat("//", "WAYPOINT_VERSION ", ftos_decimals(WAYPOINT_VERSION, 2), "\n"));
        fputs(file, strcat("//", "WAYPOINT_SYMMETRY ", sym_str, "\n"));
-       fputs(file, strcat("//", "\n"));
+
+       strcpy(waypoint_time, strftime(true, "%Y-%m-%d %H:%M:%S"));
+       fputs(file, strcat("//", "WAYPOINT_TIME ", waypoint_time, "\n"));
+       //fputs(file, strcat("//", "\n"));
+       //fputs(file, strcat("//", "\n"));
+       //fputs(file, strcat("//", "\n"));
 
        int c = 0;
        IL_EACH(g_waypoints, true,
@@ -1135,6 +1147,8 @@ float waypoint_loadall()
                                        if (tokens > 2) { sym_param2 = stof(argv(2)); }
                                        if (tokens > 3) { sym_param3 = stof(argv(3)); }
                                }
+                               else if(substring(s, 2, 14) == "WAYPOINT_TIME ")
+                                       strcpy(waypoint_time, substring(s, 16, -1));
                                continue;
                        }
                        else
index 595c2d058fcc1cd82fa1a082ffd29096f90adc3b..34372fe9661f535439b4c815cb6ef5c632dac6c8 100644 (file)
@@ -6,7 +6,8 @@
 // increase by 0.01 when changes require only waypoint relinking
 // increase by 1 when changes require to manually edit waypoints
 // max 2 decimal places, always specified
-#define WAYPOINT_VERSION 1.01
+const float WAYPOINT_VERSION = 1.01;
+string waypoint_time;
 
 // fields you can query using prvm_global server to get some statistics about waypoint linking culling
 float relink_total, relink_walkculled, relink_pvsculled, relink_lengthculled;
index 04172b5eb2b59d74de854c3c1d440ad4c5f7827a..1e3b9e51022685e1eeae3fc94a6778e4eba53fd0 100644 (file)
@@ -45,7 +45,7 @@ void Drag_MoveDrag(entity from, entity to) { }
 
 #else
 
-.float maycheat;
+.bool maycheat;
 float gamestart_sv_cheats;
 
 
@@ -59,7 +59,7 @@ void CheatShutdown()
 {
 }
 
-float CheatsAllowed(entity this, float i, float argc, float fr) // the cheat gets passed as argument for possible future ACL checking
+float CheatsAllowed(entity this, float i, int argc, float fr) // the cheat gets passed as argument for possible future ACL checking
 {
        // dead people cannot cheat
        if(IS_DEAD(this))
index da495f7962f89210697c4dead7802da99df03d78..fb63b057e23c1cc250da3741ae7fcf65af058ac9 100644 (file)
@@ -18,7 +18,7 @@
 //  Last updated: December 29th, 2011
 // =====================================================
 
-void BanCommand_ban(float request, float argc, string command)
+void BanCommand_ban(int request, int argc, string command)
 {
        switch (request)
        {
@@ -54,7 +54,7 @@ void BanCommand_ban(float request, float argc, string command)
        }
 }
 
-void BanCommand_banlist(float request)
+void BanCommand_banlist(int request)
 {
        switch (request)
        {
@@ -75,7 +75,7 @@ void BanCommand_banlist(float request)
        }
 }
 
-void BanCommand_kickban(float request, float argc, string command)
+void BanCommand_kickban(int request, int argc, string command)
 {
        switch (request)
        {
@@ -122,7 +122,7 @@ void BanCommand_kickban(float request, float argc, string command)
        }
 }
 
-void BanCommand_mute(float request, float argc, string command)  // TODO: Add a sort of mute-"ban" which allows players to be muted based on IP/cryptokey
+void BanCommand_mute(int request, int argc, string command)  // TODO: Add a sort of mute-"ban" which allows players to be muted based on IP/cryptokey
 {
        switch (request)
        {
@@ -157,7 +157,7 @@ void BanCommand_mute(float request, float argc, string command)  // TODO: Add a
        }
 }
 
-void BanCommand_unban(float request, float argc)
+void BanCommand_unban(int request, int argc)
 {
        switch (request)
        {
@@ -203,7 +203,7 @@ void BanCommand_unban(float request, float argc)
        }
 }
 
-void BanCommand_unmute(float request, float argc)
+void BanCommand_unmute(int request, int argc)
 {
        switch (request)
        {
@@ -240,7 +240,7 @@ void BanCommand_unmute(float request, float argc)
 
 /* use this when creating a new command, making sure to place it in alphabetical order... also,
 ** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void BanCommand_(float request)
+void BanCommand_(int request)
 {
     switch(request)
     {
@@ -285,7 +285,7 @@ void BanCommand_macro_help()
 #undef BAN_COMMAND
 }
 
-float BanCommand_macro_command(float argc, string command)
+float BanCommand_macro_command(int argc, string command)
 {
        #define BAN_COMMAND(name, function, description) \
                { if (name == strtolower(argv(0))) { function; return true; } }
@@ -296,7 +296,7 @@ float BanCommand_macro_command(float argc, string command)
        return false;
 }
 
-float BanCommand_macro_usage(float argc)
+float BanCommand_macro_usage(int argc)
 {
        #define BAN_COMMAND(name, function, description) \
                { if (name == strtolower(argv(1))) { function; return true; } }
@@ -318,7 +318,7 @@ void BanCommand_macro_write_aliases(float fh)
 
 float BanCommand(string command)
 {
-       float argc = tokenize_console(command);
+       int argc = tokenize_console(command);
 
        // Guide for working with argc arguments by example:
        // argc:   1    - 2      - 3     - 4
index 3cbaaf978e2950d7ad241a4147fab59953db3c11..ae16532ecfb37d77fbbc3e38ec32a814c0cfd6f0 100644 (file)
@@ -12,4 +12,4 @@
 void BanCommand_macro_write_aliases(float fh);
 
 void BanCommand_macro_help();
-float BanCommand_macro_usage(float argc);
+float BanCommand_macro_usage(int argc);
index 30abb6848794221e08a675dc7b2cc251facd306d..ed1024df52fac0faac030bcbd4fcd58a15e750d7 100644 (file)
@@ -72,7 +72,7 @@ bool SV_ParseClientCommand_floodcheck(entity this)
 //  Command Sub-Functions
 // =======================
 
-void ClientCommand_autoswitch(entity caller, float request, float argc)
+void ClientCommand_autoswitch(entity caller, int request, int argc)
 {
        switch (request)
        {
@@ -97,7 +97,7 @@ void ClientCommand_autoswitch(entity caller, float request, float argc)
        }
 }
 
-void ClientCommand_clientversion(entity caller, float request, float argc)  // internal command, used only by code
+void ClientCommand_clientversion(entity caller, int request, int argc)  // internal command, used only by code
 {
        switch (request)
        {
@@ -140,7 +140,7 @@ void ClientCommand_clientversion(entity caller, float request, float argc)  // i
        }
 }
 
-void ClientCommand_mv_getpicture(entity caller, float request, float argc)  // internal command, used only by code
+void ClientCommand_mv_getpicture(entity caller, int request, int argc)  // internal command, used only by code
 {
        switch (request)
        {
@@ -165,7 +165,7 @@ void ClientCommand_mv_getpicture(entity caller, float request, float argc)  // i
        }
 }
 
-void ClientCommand_join(entity caller, float request)
+void ClientCommand_join(entity caller, int request)
 {
        switch (request)
        {
@@ -189,7 +189,7 @@ void ClientCommand_join(entity caller, float request)
        }
 }
 
-void ClientCommand_physics(entity caller, float request, float argc)
+void ClientCommand_physics(entity caller, int request, int argc)
 {
        switch (request)
        {
@@ -229,7 +229,7 @@ void ClientCommand_physics(entity caller, float request, float argc)
        }
 }
 
-void ClientCommand_ready(entity caller, float request)  // todo: anti-spam for toggling readyness
+void ClientCommand_ready(entity caller, int request)  // todo: anti-spam for toggling readyness
 {
        switch (request)
        {
@@ -278,7 +278,7 @@ void ClientCommand_ready(entity caller, float request)  // todo: anti-spam for t
        }
 }
 
-void ClientCommand_say(entity caller, float request, float argc, string command)
+void ClientCommand_say(entity caller, int request, int argc, string command)
 {
        switch (request)
        {
@@ -298,7 +298,7 @@ void ClientCommand_say(entity caller, float request, float argc, string command)
        }
 }
 
-void ClientCommand_say_team(entity caller, float request, float argc, string command)
+void ClientCommand_say_team(entity caller, int request, int argc, string command)
 {
        switch (request)
        {
@@ -319,7 +319,7 @@ void ClientCommand_say_team(entity caller, float request, float argc, string com
 }
 
 .bool team_selected;
-void ClientCommand_selectteam(entity caller, float request, float argc)
+void ClientCommand_selectteam(entity caller, int request, int argc)
 {
        switch (request)
        {
@@ -424,7 +424,7 @@ void ClientCommand_selectteam(entity caller, float request, float argc)
        }
 }
 
-void ClientCommand_selfstuff(entity caller, float request, string command)
+void ClientCommand_selfstuff(entity caller, int request, string command)
 {
        switch (request)
        {
@@ -448,7 +448,7 @@ void ClientCommand_selfstuff(entity caller, float request, string command)
        }
 }
 
-void ClientCommand_sentcvar(entity caller, float request, float argc, string command)
+void ClientCommand_sentcvar(entity caller, int request, int argc, string command)
 {
        switch (request)
        {
@@ -482,7 +482,7 @@ void ClientCommand_sentcvar(entity caller, float request, float argc, string com
        }
 }
 
-void ClientCommand_spectate(entity caller, float request)
+void ClientCommand_spectate(entity caller, int request)
 {
        switch (request)
        {
@@ -522,7 +522,7 @@ void ClientCommand_spectate(entity caller, float request)
        }
 }
 
-void ClientCommand_suggestmap(entity caller, float request, float argc)
+void ClientCommand_suggestmap(entity caller, int request, int argc)
 {
        switch (request)
        {
@@ -546,7 +546,7 @@ void ClientCommand_suggestmap(entity caller, float request, float argc)
        }
 }
 
-void ClientCommand_tell(entity caller, float request, float argc, string command)
+void ClientCommand_tell(entity caller, int request, int argc, string command)
 {
        switch (request)
        {
@@ -603,7 +603,7 @@ void ClientCommand_tell(entity caller, float request, float argc, string command
        }
 }
 
-void ClientCommand_voice(entity caller, float request, float argc, string command)
+void ClientCommand_voice(entity caller, int request, int argc, string command)
 {
        switch (request)
        {
@@ -640,7 +640,7 @@ void ClientCommand_voice(entity caller, float request, float argc, string comman
 
 /* use this when creating a new command, making sure to place it in alphabetical order... also,
 ** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void ClientCommand_(entity caller, float request)
+void ClientCommand_(entity caller, int request)
 {
     switch(request)
     {
@@ -670,8 +670,9 @@ void ClientCommand_(entity caller, float request)
 #define CLIENT_COMMANDS(ent, request, arguments, command) \
        CLIENT_COMMAND("autoswitch", ClientCommand_autoswitch(ent, request, arguments), "Whether or not to switch automatically when getting a better weapon") \
        CLIENT_COMMAND("clientversion", ClientCommand_clientversion(ent, request, arguments), "Release version of the game") \
-       CLIENT_COMMAND("mv_getpicture", ClientCommand_mv_getpicture(ent, request, arguments), "Retrieve mapshot picture from the server") \
        CLIENT_COMMAND("join", ClientCommand_join(ent, request), "Become a player in the game") \
+       CLIENT_COMMAND("minigame", ClientCommand_minigame(ent, request, arguments, command), "Start a minigame") \
+       CLIENT_COMMAND("mv_getpicture", ClientCommand_mv_getpicture(ent, request, arguments), "Retrieve mapshot picture from the server") \
        CLIENT_COMMAND("physics", ClientCommand_physics(ent, request, arguments), "Change physics set") \
        CLIENT_COMMAND("ready", ClientCommand_ready(ent, request), "Qualify as ready to end warmup stage (or restart server if allowed)") \
        CLIENT_COMMAND("say", ClientCommand_say(ent, request, arguments, command), "Print a message to chat to all players") \
@@ -683,7 +684,6 @@ void ClientCommand_(entity caller, float request)
        CLIENT_COMMAND("suggestmap", ClientCommand_suggestmap(ent, request, arguments), "Suggest a map to the mapvote at match end") \
        CLIENT_COMMAND("tell", ClientCommand_tell(ent, request, arguments, command), "Send a message directly to a player") \
        CLIENT_COMMAND("voice", ClientCommand_voice(ent, request, arguments, command), "Send voice message via sound") \
-       CLIENT_COMMAND("minigame", ClientCommand_minigame(ent, request, arguments, command), "Start a minigame") \
        /* nothing */
 
 void ClientCommand_macro_help(entity caller)
@@ -695,7 +695,7 @@ void ClientCommand_macro_help(entity caller)
 #undef CLIENT_COMMAND
 }
 
-float ClientCommand_macro_command(float argc, entity caller, string command)
+float ClientCommand_macro_command(int argc, entity caller, string command)
 {
        #define CLIENT_COMMAND(name, function, description) \
                { if (name == strtolower(argv(0))) { function; return true; } }
@@ -706,7 +706,7 @@ float ClientCommand_macro_command(float argc, entity caller, string command)
        return false;
 }
 
-float ClientCommand_macro_usage(float argc, entity caller)
+float ClientCommand_macro_usage(int argc, entity caller)
 {
        #define CLIENT_COMMAND(name, function, description) \
                { if (name == strtolower(argv(1))) { function; return true; } }
@@ -744,7 +744,7 @@ void SV_ParseClientCommand(entity this, string command)
        // if we're banned, don't even parse the command
        if (Ban_MaybeEnforceBanOnce(this)) return;
 
-       float argc = tokenize_console(command);
+       int argc = tokenize_console(command);
 
        // Guide for working with argc arguments by example:
        // argc:   1    - 2      - 3     - 4
index cb8ab239fbebd1ac74b4781982d3d93ed14f43ac..643afa3f177887ff8ab2754a30c882eb90263231 100644 (file)
@@ -76,7 +76,7 @@ float VerifyClientNumber(float tmp_number)
        else return true;
 }
 
-entity GetIndexedEntity(float argc, float start_index)
+entity GetIndexedEntity(int argc, float start_index)
 {
        entity selection;
        float tmp_number, index;
@@ -280,7 +280,7 @@ void timeout_handler_think(entity this)
 //  Common commands used in both sv_cmd.qc and cmd.qc
 // ===================================================
 
-void CommonCommand_cvar_changes(float request, entity caller)
+void CommonCommand_cvar_changes(int request, entity caller)
 {
        switch (request)
        {
@@ -301,7 +301,7 @@ void CommonCommand_cvar_changes(float request, entity caller)
        }
 }
 
-void CommonCommand_cvar_purechanges(float request, entity caller)
+void CommonCommand_cvar_purechanges(int request, entity caller)
 {
        switch (request)
        {
@@ -469,7 +469,7 @@ void CommonCommand_editmob(int request, entity caller, int argc)
        }
 }
 
-void CommonCommand_info(float request, entity caller, float argc)
+void CommonCommand_info(int request, entity caller, int argc)
 {
        switch (request)
        {
@@ -493,7 +493,7 @@ void CommonCommand_info(float request, entity caller, float argc)
        }
 }
 
-void CommonCommand_ladder(float request, entity caller)
+void CommonCommand_ladder(int request, entity caller)
 {
        switch (request)
        {
@@ -513,7 +513,7 @@ void CommonCommand_ladder(float request, entity caller)
        }
 }
 
-void CommonCommand_lsmaps(float request, entity caller)
+void CommonCommand_lsmaps(int request, entity caller)
 {
        switch (request)
        {
@@ -533,7 +533,7 @@ void CommonCommand_lsmaps(float request, entity caller)
        }
 }
 
-void CommonCommand_printmaplist(float request, entity caller)
+void CommonCommand_printmaplist(int request, entity caller)
 {
        switch (request)
        {
@@ -553,7 +553,7 @@ void CommonCommand_printmaplist(float request, entity caller)
        }
 }
 
-void CommonCommand_rankings(float request, entity caller)
+void CommonCommand_rankings(int request, entity caller)
 {
        switch (request)
        {
@@ -573,7 +573,7 @@ void CommonCommand_rankings(float request, entity caller)
        }
 }
 
-void CommonCommand_records(float request, entity caller)
+void CommonCommand_records(int request, entity caller)
 {
        switch (request)
        {
@@ -601,7 +601,7 @@ void CommonCommand_records(float request, entity caller)
        }
 }
 
-void CommonCommand_teamstatus(float request, entity caller)
+void CommonCommand_teamstatus(int request, entity caller)
 {
        switch (request)
        {
@@ -621,7 +621,7 @@ void CommonCommand_teamstatus(float request, entity caller)
        }
 }
 
-void CommonCommand_time(float request, entity caller)
+void CommonCommand_time(int request, entity caller)
 {
        switch (request)
        {
@@ -632,8 +632,8 @@ void CommonCommand_time(float request, entity caller)
                        print_to(caller, strcat("realtime = ", ftos(gettime(GETTIME_REALTIME))));
                        print_to(caller, strcat("hires = ", ftos(gettime(GETTIME_HIRES))));
                        print_to(caller, strcat("uptime = ", ftos(gettime(GETTIME_UPTIME))));
-                       print_to(caller, strcat("localtime = ", strftime(true, "%a %b %e %H:%M:%S %Z %Y")));
-                       print_to(caller, strcat("gmtime = ", strftime(false, "%a %b %e %H:%M:%S %Z %Y")));
+                       print_to(caller, strcat("localtime = ", strftime(true, "%a %b %d %H:%M:%S %Z %Y")));
+                       print_to(caller, strcat("gmtime = ", strftime(false, "%a %b %d %H:%M:%S %Z %Y")));
                        return;
                }
 
@@ -647,7 +647,7 @@ void CommonCommand_time(float request, entity caller)
        }
 }
 
-void CommonCommand_timein(float request, entity caller)
+void CommonCommand_timein(int request, entity caller)
 {
        switch (request)
        {
@@ -702,7 +702,7 @@ void CommonCommand_timein(float request, entity caller)
        }
 }
 
-void CommonCommand_timeout(float request, entity caller)  // DEAR GOD THIS COMMAND IS TERRIBLE.
+void CommonCommand_timeout(int request, entity caller)  // DEAR GOD THIS COMMAND IS TERRIBLE.
 {
        switch (request)
        {
@@ -771,7 +771,7 @@ void CommonCommand_timeout(float request, entity caller)  // DEAR GOD THIS COMMA
        }
 }
 
-void CommonCommand_who(float request, entity caller, float argc)
+void CommonCommand_who(int request, entity caller, int argc)
 {
        switch (request)
        {
@@ -836,7 +836,7 @@ void CommonCommand_who(float request, entity caller, float argc)
 
 /* use this when creating a new command, making sure to place it in alphabetical order... also,
 ** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void CommonCommand_(float request, entity caller)
+void CommonCommand_(int request, entity caller)
 {
     switch(request)
     {
index 13cbfe49e127ece70856a11fcd58f670c5750fa6..f03a815de26b6de896ddee64a71dc6e05e0476c2 100644 (file)
@@ -81,7 +81,7 @@ string GetClientErrorString_color(float clienterror, string original_input, stri
 // is this entity number even in the possible range of entities?
 float VerifyClientNumber(float tmp_number);
 
-entity GetIndexedEntity(float argc, float start_index);
+entity GetIndexedEntity(int argc, float start_index);
 
 // find a player which matches the input string, and return their entity
 entity GetFilteredEntity(string input);
@@ -105,33 +105,33 @@ void timeout_handler_think(entity this);
 //  Common commands used in both sv_cmd.qc and cmd.qc
 // ===================================================
 
-void CommonCommand_cvar_changes(float request, entity caller);
+void CommonCommand_cvar_changes(int request, entity caller);
 
-void CommonCommand_cvar_purechanges(float request, entity caller);
+void CommonCommand_cvar_purechanges(int request, entity caller);
 
-void CommonCommand_editmob(float request, entity caller, float argc);
+void CommonCommand_editmob(int request, entity caller, int argc);
 
-void CommonCommand_info(float request, entity caller, float argc);
+void CommonCommand_info(int request, entity caller, int argc);
 
-void CommonCommand_ladder(float request, entity caller);
+void CommonCommand_ladder(int request, entity caller);
 
-void CommonCommand_lsmaps(float request, entity caller);
+void CommonCommand_lsmaps(int request, entity caller);
 
-void CommonCommand_printmaplist(float request, entity caller);
+void CommonCommand_printmaplist(int request, entity caller);
 
-void CommonCommand_rankings(float request, entity caller);
+void CommonCommand_rankings(int request, entity caller);
 
-void CommonCommand_records(float request, entity caller);
+void CommonCommand_records(int request, entity caller);
 
-void CommonCommand_teamstatus(float request, entity caller);
+void CommonCommand_teamstatus(int request, entity caller);
 
-void CommonCommand_time(float request, entity caller);
+void CommonCommand_time(int request, entity caller);
 
-void CommonCommand_timein(float request, entity caller);
+void CommonCommand_timein(int request, entity caller);
 
-void CommonCommand_timeout(float request, entity caller);
+void CommonCommand_timeout(int request, entity caller);
 
-void CommonCommand_who(float request, entity caller, float argc);
+void CommonCommand_who(int request, entity caller, int argc);
 
 
 // ==================================
@@ -160,7 +160,7 @@ void CommonCommand_macro_help(entity caller)
        FOREACH(COMMON_COMMANDS, true, { print_to(caller, sprintf("  ^2%s^7: %s", it.m_name, it.m_description)); });
 }
 
-float CommonCommand_macro_command(float argc, entity caller, string command)
+float CommonCommand_macro_command(int argc, entity caller, string command)
 {
        string c = strtolower(argv(0));
        FOREACH(COMMON_COMMANDS, it.m_name == c, {
@@ -170,7 +170,7 @@ float CommonCommand_macro_command(float argc, entity caller, string command)
        return false;
 }
 
-float CommonCommand_macro_usage(float argc, entity caller)
+float CommonCommand_macro_usage(int argc, entity caller)
 {
        string c = strtolower(argv(1));
        FOREACH(COMMON_COMMANDS, it.m_name == c, {
index 87bcef82f7124e1f001603129320b0684d46af5f..e3dbf795f60541f9482f4997c42b28b540552837 100644 (file)
@@ -366,7 +366,7 @@ void RadarMap_Think(entity this)
        }
 }
 
-bool RadarMap_Make(float argc)
+bool RadarMap_Make(int argc)
 {
        float i;
 
index ffa82e5c02e09131efb74f5fd150fba0b4e601ec..44bd8fb4bac922794440153d22b1ee0ac9422d13 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 #ifndef RADARMAP
-bool RadarMap_Make(float argc) { LOG_INFO("radarmap is disabled, compile with -DRADARMAP to enable it."); return true; }
+bool RadarMap_Make(int argc) { LOG_INFO("radarmap is disabled, compile with -DRADARMAP to enable it."); return true; }
 #else
 
 // ===========================================
@@ -17,6 +17,6 @@ string doublehex = "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D
 // FF is contained twice, to map 256 to FF too
 // removes the need to bound()
 
-bool RadarMap_Make(float argc);
+bool RadarMap_Make(int argc);
 
 #endif
index 8b8c345d8037f86822568be780091aaaf7ac224a..c3e5bf9015293c712bb59f4e1d05c6c71f626804 100644 (file)
@@ -88,7 +88,7 @@ void changematchtime(float delta, float mi, float ma)
 //  Command Sub-Functions
 // =======================
 
-void GameCommand_adminmsg(float request, float argc)
+void GameCommand_adminmsg(int request, int argc)
 {
        switch (request)
        {
@@ -160,7 +160,7 @@ void GameCommand_adminmsg(float request, float argc)
        }
 }
 
-void GameCommand_allready(float request)
+void GameCommand_allready(int request)
 {
        switch (request)
        {
@@ -180,7 +180,7 @@ void GameCommand_allready(float request)
        }
 }
 
-void GameCommand_allspec(float request, float argc)
+void GameCommand_allspec(int request, int argc)
 {
        switch (request)
        {
@@ -209,7 +209,7 @@ void GameCommand_allspec(float request, float argc)
        }
 }
 
-void GameCommand_anticheat(float request, float argc)
+void GameCommand_anticheat(int request, int argc)
 {
        switch (request)
        {
@@ -240,7 +240,7 @@ void GameCommand_anticheat(float request, float argc)
        }
 }
 
-void GameCommand_bbox(float request)
+void GameCommand_bbox(int request)
 {
        switch (request)
        {
@@ -313,7 +313,7 @@ void GameCommand_bbox(float request)
        }
 }
 
-void GameCommand_bot_cmd(float request, float argc, string command)
+void GameCommand_bot_cmd(int request, int argc, string command)
 {
        switch (request)
        {
@@ -445,7 +445,7 @@ void GameCommand_bot_cmd(float request, float argc, string command)
        }
 }
 
-void GameCommand_cointoss(float request, float argc)
+void GameCommand_cointoss(int request, int argc)
 {
        switch (request)
        {
@@ -469,7 +469,7 @@ void GameCommand_cointoss(float request, float argc)
        }
 }
 
-void GameCommand_database(float request, float argc)
+void GameCommand_database(int request, int argc)
 {
        switch (request)
        {
@@ -512,7 +512,7 @@ void GameCommand_database(float request, float argc)
        }
 }
 
-void GameCommand_defer_clear(float request, float argc)
+void GameCommand_defer_clear(int request, int argc)
 {
        switch (request)
        {
@@ -549,14 +549,14 @@ void GameCommand_defer_clear(float request, float argc)
        }
 }
 
-void GameCommand_defer_clear_all(float request)
+void GameCommand_defer_clear_all(int request)
 {
        switch (request)
        {
                case CMD_REQUEST_COMMAND:
                {
                        int n = 0;
-                       float argc;
+                       int argc;
 
                        FOREACH_CLIENT(true, {
                                argc = tokenize_console(strcat("defer_clear ", ftos(etof(it))));
@@ -578,7 +578,7 @@ void GameCommand_defer_clear_all(float request)
        }
 }
 
-void GameCommand_delrec(float request, float argc)  // perhaps merge later with records and printstats and such?
+void GameCommand_delrec(int request, int argc)  // perhaps merge later with records and printstats and such?
 {
        switch (request)
        {
@@ -605,7 +605,7 @@ void GameCommand_delrec(float request, float argc)  // perhaps merge later with
        }
 }
 
-void GameCommand_effectindexdump(float request)
+void GameCommand_effectindexdump(int request)
 {
        switch (request)
        {
@@ -719,7 +719,7 @@ void GameCommand_effectindexdump(float request)
        }
 }
 
-void GameCommand_extendmatchtime(float request)
+void GameCommand_extendmatchtime(int request)
 {
        switch (request)
        {
@@ -740,7 +740,7 @@ void GameCommand_extendmatchtime(float request)
        }
 }
 
-void GameCommand_gametype(float request, float argc)
+void GameCommand_gametype(int request, int argc)
 {
        switch (request)
        {
@@ -790,7 +790,7 @@ void GameCommand_gametype(float request, float argc)
        }
 }
 
-void GameCommand_gettaginfo(float request, float argc)
+void GameCommand_gettaginfo(int request, int argc)
 {
        switch (request)
        {
@@ -855,7 +855,7 @@ void GameCommand_gettaginfo(float request, float argc)
        }
 }
 
-void GameCommand_animbench(float request, float argc)
+void GameCommand_animbench(int request, int argc)
 {
        switch (request)
        {
@@ -914,7 +914,7 @@ void GameCommand_animbench(float request, float argc)
        }
 }
 
-void GameCommand_gotomap(float request, float argc)
+void GameCommand_gotomap(int request, int argc)
 {
        switch (request)
        {
@@ -939,7 +939,7 @@ void GameCommand_gotomap(float request, float argc)
        }
 }
 
-void GameCommand_lockteams(float request)
+void GameCommand_lockteams(int request)
 {
        switch (request)
        {
@@ -968,7 +968,7 @@ void GameCommand_lockteams(float request)
        }
 }
 
-void GameCommand_make_mapinfo(float request)
+void GameCommand_make_mapinfo(int request)
 {
        switch (request)
        {
@@ -994,7 +994,7 @@ void GameCommand_make_mapinfo(float request)
        }
 }
 
-void GameCommand_moveplayer(float request, float argc)
+void GameCommand_moveplayer(int request, int argc)
 {
        switch (request)
        {
@@ -1179,7 +1179,7 @@ void GameCommand_moveplayer(float request, float argc)
        }
 }
 
-void GameCommand_nospectators(float request)
+void GameCommand_nospectators(int request)
 {
        switch (request)
        {
@@ -1208,7 +1208,7 @@ void GameCommand_nospectators(float request)
        }
 }
 
-void GameCommand_printstats(float request)
+void GameCommand_printstats(int request)
 {
        switch (request)
        {
@@ -1229,7 +1229,7 @@ void GameCommand_printstats(float request)
        }
 }
 
-void GameCommand_radarmap(float request, float argc)
+void GameCommand_radarmap(int request, int argc)
 {
        switch (request)
        {
@@ -1251,7 +1251,7 @@ void GameCommand_radarmap(float request, float argc)
        }
 }
 
-void GameCommand_reducematchtime(float request)
+void GameCommand_reducematchtime(int request)
 {
        switch (request)
        {
@@ -1272,7 +1272,7 @@ void GameCommand_reducematchtime(float request)
        }
 }
 
-void GameCommand_setbots(float request, float argc)
+void GameCommand_setbots(int request, int argc)
 {
        switch (request)
        {
@@ -1299,7 +1299,7 @@ void GameCommand_setbots(float request, float argc)
        }
 }
 
-void GameCommand_shuffleteams(float request)
+void GameCommand_shuffleteams(int request)
 {
        switch (request)
        {
@@ -1357,7 +1357,7 @@ void GameCommand_shuffleteams(float request)
        }
 }
 
-void GameCommand_stuffto(float request, float argc)
+void GameCommand_stuffto(int request, int argc)
 {
        // This... is a fairly dangerous and powerful command... - It allows any arguments to be sent to a client via rcon.
        // Because of this, it is disabled by default and must be enabled by the server owner when doing compilation. That way,
@@ -1406,7 +1406,7 @@ void GameCommand_stuffto(float request, float argc)
 #endif
 }
 
-void GameCommand_trace(float request, float argc)
+void GameCommand_trace(int request, int argc)
 {
        switch (request)
        {
@@ -1582,7 +1582,7 @@ void GameCommand_trace(float request, float argc)
        }
 }
 
-void GameCommand_unlockteams(float request)
+void GameCommand_unlockteams(int request)
 {
        switch (request)
        {
@@ -1611,7 +1611,7 @@ void GameCommand_unlockteams(float request)
        }
 }
 
-void GameCommand_warp(float request, float argc)
+void GameCommand_warp(int request, int argc)
 {
        switch (request)
        {
@@ -1650,7 +1650,7 @@ void GameCommand_warp(float request, float argc)
 
 /* use this when creating a new command, making sure to place it in alphabetical order... also,
 ** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void GameCommand_(float request)
+void GameCommand_(int request)
 {
     switch(request)
     {
@@ -1713,7 +1713,7 @@ void GameCommand_macro_help()
        FOREACH(SERVER_COMMANDS, true, { LOG_INFOF("  ^2%s^7: %s", it.m_name, it.m_description); });
 }
 
-float GameCommand_macro_command(float argc, string command)
+float GameCommand_macro_command(int argc, string command)
 {
        string c = strtolower(argv(0));
        FOREACH(SERVER_COMMANDS, it.m_name == c, {
@@ -1723,7 +1723,7 @@ float GameCommand_macro_command(float argc, string command)
        return false;
 }
 
-float GameCommand_macro_usage(float argc)
+float GameCommand_macro_usage(int argc)
 {
        string c = strtolower(argv(1));
        FOREACH(SERVER_COMMANDS, it.m_name == c, {
@@ -1746,7 +1746,7 @@ void GameCommand_macro_write_aliases(float fh)
 
 void GameCommand(string command)
 {
-       float argc = tokenize_console(command);
+       int argc = tokenize_console(command);
 
        // Guide for working with argc arguments by example:
        // argc:   1    - 2      - 3     - 4
index b990888e6a1e2fa6e49974e3507067cfe11b3220..6d9b4d76e115b8189700c35fb0201d6369b99bca 100644 (file)
@@ -515,7 +515,7 @@ float Votecommand_check_assignment(entity caller, float assignment)
        return false;
 }
 
-string VoteCommand_extractcommand(string input, float startpos, float argc)
+string VoteCommand_extractcommand(string input, float startpos, int argc)
 {
        string output;
 
@@ -572,7 +572,7 @@ string ValidateMap(string validated_map, entity caller)
        return validated_map;
 }
 
-float VoteCommand_checkargs(float startpos, float argc)
+float VoteCommand_checkargs(float startpos, int argc)
 {
        float p, q, check, minargs;
        string cvarname = strcat("sv_vote_command_restriction_", argv(startpos));
@@ -646,7 +646,7 @@ float VoteCommand_checkargs(float startpos, float argc)
        return true;
 }
 
-int VoteCommand_parse(entity caller, string vote_command, string vote_list, float startpos, float argc)
+int VoteCommand_parse(entity caller, string vote_command, string vote_list, float startpos, int argc)
 {
        string first_command = argv(startpos);
        int missing_chars = argv_start_index(startpos);
@@ -731,7 +731,7 @@ int VoteCommand_parse(entity caller, string vote_command, string vote_list, floa
 //  Command Sub-Functions
 // =======================
 
-void VoteCommand_abstain(float request, entity caller)  // CLIENT ONLY
+void VoteCommand_abstain(int request, entity caller)  // CLIENT ONLY
 {
        switch (request)
        {
@@ -763,7 +763,7 @@ void VoteCommand_abstain(float request, entity caller)  // CLIENT ONLY
        }
 }
 
-void VoteCommand_call(float request, entity caller, float argc, string vote_command)  // BOTH
+void VoteCommand_call(int request, entity caller, int argc, string vote_command)  // BOTH
 {
        switch (request)
        {
@@ -850,7 +850,7 @@ void VoteCommand_call(float request, entity caller, float argc, string vote_comm
        }
 }
 
-void VoteCommand_master(float request, entity caller, float argc, string vote_command)  // CLIENT ONLY
+void VoteCommand_master(int request, entity caller, int argc, string vote_command)  // CLIENT ONLY
 {
        switch (request)
        {
@@ -965,7 +965,7 @@ void VoteCommand_master(float request, entity caller, float argc, string vote_co
        }
 }
 
-void VoteCommand_no(float request, entity caller)  // CLIENT ONLY
+void VoteCommand_no(int request, entity caller)  // CLIENT ONLY
 {
        switch (request)
        {
@@ -1003,7 +1003,7 @@ void VoteCommand_no(float request, entity caller)  // CLIENT ONLY
        }
 }
 
-void VoteCommand_status(float request, entity caller)  // BOTH
+void VoteCommand_status(int request, entity caller)  // BOTH
 {
        switch (request)
        {
@@ -1025,7 +1025,7 @@ void VoteCommand_status(float request, entity caller)  // BOTH
        }
 }
 
-void VoteCommand_stop(float request, entity caller)  // BOTH
+void VoteCommand_stop(int request, entity caller)  // BOTH
 {
        switch (request)
        {
@@ -1047,7 +1047,7 @@ void VoteCommand_stop(float request, entity caller)  // BOTH
        }
 }
 
-void VoteCommand_yes(float request, entity caller)  // CLIENT ONLY
+void VoteCommand_yes(int request, entity caller)  // CLIENT ONLY
 {
        switch (request)
        {
@@ -1082,7 +1082,7 @@ void VoteCommand_yes(float request, entity caller)  // CLIENT ONLY
 
 /* use this when creating a new command, making sure to place it in alphabetical order... also,
 ** ADD ALL NEW COMMANDS TO commands.cfg WITH PROPER ALIASES IN THE SAME FASHION!
-void VoteCommand_(float request)
+void VoteCommand_(int request)
 {
     switch(request)
     {
@@ -1120,7 +1120,7 @@ void VoteCommand_(float request)
        VOTE_COMMAND("yes", VoteCommand_yes(request, caller), "Select yes in current vote", VC_ASGNMNT_CLIENTONLY) \
        /* nothing */
 
-void VoteCommand_macro_help(entity caller, float argc)
+void VoteCommand_macro_help(entity caller, int argc)
 {
        string command_origin = GetCommandPrefix(caller);
 
@@ -1153,7 +1153,7 @@ void VoteCommand_macro_help(entity caller, float argc)
        }
 }
 
-float VoteCommand_macro_command(entity caller, float argc, string vote_command)
+float VoteCommand_macro_command(entity caller, int argc, string vote_command)
 {
        #define VOTE_COMMAND(name, function, description, assignment) \
                { if (Votecommand_check_assignment(caller, assignment)) { if (name == strtolower(argv(1))) { function; return true; } } }
@@ -1169,7 +1169,7 @@ float VoteCommand_macro_command(entity caller, float argc, string vote_command)
 //  Main function handling vote commands
 // ======================================
 
-void VoteCommand(float request, entity caller, float argc, string vote_command)
+void VoteCommand(int request, entity caller, int argc, string vote_command)
 {
        // Guide for working with argc arguments by example:
        // argc:   1    - 2      - 3     - 4
index d5c3bc0ad0e937d9569d1ec95cc539cd09c78897..988e91bbce615648873186adf6fb5306d4641c54 100644 (file)
@@ -41,7 +41,7 @@ string vote_parsed_display; // visual string which is fixed after being parsed
 // allow functions to be used in other code like g_world.qc and teamplay.qc
 void VoteThink();
 void VoteReset();
-void VoteCommand(float request, entity caller, float argc, string vote_command);
+void VoteCommand(int request, entity caller, int argc, string vote_command);
 
 // warmup and nagger stuff
 const float RESTART_COUNTDOWN = 10;
index 908d99444887f43ebeef093a34039fc532d08089..f1299bf30d0ae141dbcb01c9a4e32baf74f223f0 100644 (file)
@@ -25,7 +25,7 @@ float currentbots;
 float bots_would_leave;
 
 void UpdateFrags(entity player, int f);
-.float totalfrags;
+.int totalfrags;
 
 // flag set on worldspawn so that the code knows if it is dedicated or not
 float server_is_dedicated;
@@ -41,7 +41,7 @@ float server_is_dedicated;
 
 //.float       worldtype;
 // Needed for dynamic clientwalls
-.float inactive; // Clientwall disappears when inactive
+.bool inactive; // Clientwall disappears when inactive
 .float alpha_max, alpha_min;
 .float fade_start, fade_end, fade_vertical_offset;
 .float default_solid; // Variable to store default .solid for clientwalls
@@ -213,7 +213,7 @@ float assault_attacker_team;
 float ServerProgsDB;
 float TemporaryDB;
 
-.float team_saved;
+.int team_saved;
 
 bool some_spawn_has_been_used;
 int have_team_spawns; // 0 = no team spawns requested, -1 = team spawns requested but none found, 1 = team spawns requested and found
@@ -308,9 +308,9 @@ float client_cefc_accumulatortime;
 
 .float weapon_load[Weapons_MAX];
 .int ammo_none; // used by the reloading system, must always be 0
-.float clip_load;
-.float old_clip_load;
-.float clip_size;
+.int clip_load;
+.int old_clip_load;
+.int clip_size;
 
 .int minelayer_mines;
 .float vortex_charge;
@@ -327,9 +327,9 @@ float client_cefc_accumulatortime;
 // when doing this, hagar can go through clones
 // #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_BBOX
 
-.float spectatee_status;
-.float zoomstate;
-.float restriction;
+.int spectatee_status;
+.bool zoomstate;
+.int restriction;
 
 .entity clientdata;
 .entity personal;
@@ -339,22 +339,22 @@ string deathmessage;
 .bool just_joined;
 
 .float cvar_cl_weaponimpulsemode;
-.float selectweapon; // last selected weapon of the player
+.int selectweapon; // last selected weapon of the player
 
 .float ballistics_density; // wall piercing factor, larger = bullet can pass through more
 
-const float ACTIVE_NOT                 = 0;
-const float ACTIVE_ACTIVE      = 1;
-const float ACTIVE_IDLE        = 2;
-const float ACTIVE_BUSY        = 2;
-const float ACTIVE_TOGGLE      = 3;
-.float active;
+const int ACTIVE_NOT           = 0;
+const int ACTIVE_ACTIVE        = 1;
+const int ACTIVE_IDLE          = 2;
+const int ACTIVE_BUSY          = 2;
+const int ACTIVE_TOGGLE        = 3;
+.int active;
 .void (entity this, int act_state) setactive;
 .entity realowner;
 
 //float serverflags;
 
-.float player_blocked;
+.bool player_blocked;
 
 .float revival_time; // time at which player was last revived
 .float revive_speed; // NOTE: multiplier (anything above 1 is instaheal)
@@ -374,7 +374,7 @@ USING(spawn_evalfunc_t, vector(entity this, entity player, entity spot, vector c
 
 string modname;
 
-.float missile_flags;
+.int missile_flags;
 const int MIF_SPLASH = BIT(1);
 const int MIF_ARC = BIT(2);
 const int MIF_PROXY = BIT(3);
index 0af110c9e890f29925db0803eedcd8d29f4eba04..617eca1985108e4ca82fc2b31167a8b23c69ff9b 100644 (file)
@@ -49,7 +49,7 @@ float damage_gooddamage;
 .float teamkill_soundtime;
 .entity teamkill_soundsource;
 .entity pusher;
-.float istypefrag;
+.bool istypefrag;
 .float taunt_soundtime;
 
 float IsFlying(entity a);
index 2c0af1c8f2ac12ab4d214bfc84e51dbc94388158..7b1f69384461b5d6f3c95e2e8c8054e24562279c 100644 (file)
@@ -197,7 +197,7 @@ LABEL(skip)
 
 void OnlineBanList_Think(entity this)
 {
-       float argc;
+       int argc;
        string uri;
        float i, n;
 
index 319b6f16ff7e3c7c333d8fb3a67e2b360eefbde8..7ed094cc3a616f6f4b91f0bbe5314e79273cf292 100644 (file)
@@ -40,29 +40,38 @@ void crosshair_trace(entity pl)
 {
        traceline_antilag(pl, CS(pl).cursor_trace_start, CS(pl).cursor_trace_start + normalize(CS(pl).cursor_trace_endpos - CS(pl).cursor_trace_start) * max_shot_distance, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl));
 }
-.bool ctrace_solidchanged;
+
 void crosshair_trace_plusvisibletriggers(entity pl)
+{
+       crosshair_trace_plusvisibletriggers__is_wz(pl, false);
+}
+
+void WarpZone_crosshair_trace_plusvisibletriggers(entity pl)
+{
+       crosshair_trace_plusvisibletriggers__is_wz(pl, true);
+}
+
+void crosshair_trace_plusvisibletriggers__is_wz(entity pl, bool is_wz)
 {
        FOREACH_ENTITY_FLOAT(solid, SOLID_TRIGGER,
        {
                if(it.model != "")
                {
                        it.solid = SOLID_BSP;
-                       it.ctrace_solidchanged = true;
                        IL_PUSH(g_ctrace_changed, it);
                }
        });
 
-       crosshair_trace(pl);
+       if (is_wz)
+               WarpZone_crosshair_trace(pl);
+       else
+               crosshair_trace(pl);
 
-       IL_EACH(g_ctrace_changed, it.ctrace_solidchanged,
-       {
-               it.solid = SOLID_TRIGGER;
-               it.ctrace_solidchanged = false;
-       });
+       IL_EACH(g_ctrace_changed, true, { it.solid = SOLID_TRIGGER; });
 
        IL_CLEAR(g_ctrace_changed);
 }
+
 void WarpZone_crosshair_trace(entity pl)
 {
        WarpZone_traceline_antilag(pl, CS(pl).cursor_trace_start, CS(pl).cursor_trace_start + normalize(CS(pl).cursor_trace_endpos - CS(pl).cursor_trace_start) * max_shot_distance, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl));
@@ -223,16 +232,13 @@ string formatmessage(entity this, string msg)
 {
        float p, p1, p2;
        float n;
-       vector cursor;
-       entity cursor_ent;
+       vector cursor = '0 0 0';
+       entity cursor_ent = NULL;
        string escape;
        string replacement;
        p = 0;
        n = 7;
-
-       WarpZone_crosshair_trace(this);
-       cursor = trace_endpos;
-       cursor_ent = trace_ent;
+       bool traced = false;
 
        MUTATOR_CALLHOOK(PreFormatMessage, this, msg);
        msg = M_ARGV(1, string);
@@ -256,6 +262,14 @@ string formatmessage(entity this, string msg)
                if (p < 0)
                        break;
 
+               if(!traced)
+               {
+                       WarpZone_crosshair_trace_plusvisibletriggers(this);
+                       cursor = trace_endpos;
+                       cursor_ent = trace_ent;
+                       traced = true;
+               }
+
                replacement = substring(msg, p, 2);
                escape = substring(msg, p + 1, 1);
 
@@ -875,7 +889,7 @@ void remove_safely(entity e)
     builtin_remove(e);
 }
 
-void InitializeEntity(entity e, void(entity this) func, float order)
+void InitializeEntity(entity e, void(entity this) func, int order)
 {
     entity prev, cur;
 
index 1455054d2c5cad597ec87e84412d45b74ea6dc00..ff62cd1674b3487185903df618d3198459817beb 100644 (file)
@@ -62,6 +62,8 @@ void attach_sameorigin(entity e, entity to, string tag);
 void crosshair_trace(entity pl);
 
 void crosshair_trace_plusvisibletriggers(entity pl);
+void WarpZone_crosshair_trace_plusvisibletriggers(entity pl);
+void crosshair_trace_plusvisibletriggers__is_wz(entity pl, bool is_wz);
 
 void detach_sameorigin(entity e);
 
@@ -324,17 +326,17 @@ void readlevelcvars()
 
 //#NO AUTOCVARS END
 
-const float INITPRIO_FIRST                             = 0;
-const float INITPRIO_GAMETYPE                  = 0;
-const float INITPRIO_GAMETYPE_FALLBACK         = 1;
-const float INITPRIO_FINDTARGET                = 10;
-const float INITPRIO_DROPTOFLOOR               = 20;
-const float INITPRIO_SETLOCATION               = 90;
-const float INITPRIO_LINKDOORS                         = 91;
-const float INITPRIO_LAST                              = 99;
+const int INITPRIO_FIRST               = 0;
+const int INITPRIO_GAMETYPE            = 0;
+const int INITPRIO_GAMETYPE_FALLBACK   = 1;
+const int INITPRIO_FINDTARGET          = 10;
+const int INITPRIO_DROPTOFLOOR                 = 20;
+const int INITPRIO_SETLOCATION                 = 90;
+const int INITPRIO_LINKDOORS           = 91;
+const int INITPRIO_LAST                = 99;
 
 .void(entity this) initialize_entity;
-.float initialize_entity_order;
+.int initialize_entity_order;
 .entity initialize_entity_next;
 entity initialize_entity_first;
 
@@ -342,8 +344,8 @@ entity initialize_entity_first;
 
 
 
-float sound_allowed(float dest, entity e);
-void InitializeEntity(entity e, void(entity this) func, float order);
+bool sound_allowed(int dest, entity e);
+void InitializeEntity(entity e, void(entity this) func, int order);
 
 IntrusiveList g_ctrace_changed;
 STATIC_INIT(g_ctrace_changed) { g_ctrace_changed = IL_NEW(); }
index 1c38a9fbebf3012b1d87029e26659457d7548a1c..2853f7f6d4c3887b2f6c4f8fcaf24c4624ed4e92 100644 (file)
@@ -2,7 +2,7 @@
 
 .entity pusher;
 .float pushltime;
-.float istypefrag;
+.bool istypefrag;
 
 .float CopyBody_nextthink;
 .void(entity this) CopyBody_think;
index ae64e74e4909d66882ea09e261926086977b4da0..d347fcbaf9be95d010a8af0378795ffe3c9fe315 100644 (file)
@@ -86,7 +86,7 @@ void round_handler_FirstThink(entity this)
        this.nextthink = max(time, game_starttime);
 }
 
-void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func)
+void round_handler_Spawn(bool() canRoundStart_func, bool() canRoundEnd_func, void() roundStart_func)
 {
        if (round_handler)
        {
index e6b17b0e775d76f1868c05d592c633844b1b8b8b..5979eb5c33f810faeb55f2add99f7574533fc121 100644 (file)
@@ -3,17 +3,17 @@
 entity round_handler;
 .float delay; // stores delay from round end to countdown start
 .float count; // stores initial number of the countdown
-.float wait; // it's set to true when round ends, to false when countdown starts
+.bool wait; // it's set to true when round ends, to false when countdown starts
 .float cnt;    // its initial value is .count + 1, then decreased while counting down
                        // reaches 0 when the round starts
 .float round_timelimit;
 .float round_endtime;
-.float() canRoundStart;
-.float() canRoundEnd;
+.bool() canRoundStart;
+.bool() canRoundEnd;
 .void() roundStart;
 
 void round_handler_Init(float the_delay, float the_count, float the_round_timelimit);
-void round_handler_Spawn(float() canRoundStart_func, float() canRoundEnd_func, void() roundStart_func);
+void round_handler_Spawn(bool() canRoundStart_func, bool() canRoundEnd_func, void() roundStart_func);
 void round_handler_Reset(float next_think);
 void round_handler_Remove();
 
index 5ac5a1ec8ddbce6451b641424d456c54db1df56b..8517818d6406c902715a967507f55b6eed28e669 100644 (file)
@@ -771,17 +771,14 @@ r_cullentities_trace 0
 r_shadow_glossexact 1
 r_shadow_glossintensity 1
 
-// use fake light if map has no lightmaps
-r_fakelight 1
+// use slightly better lighting than r_fullbright if map has no lightmaps, and for fullbrightplayers
+r_fullbright_directed 1
 
 r_water_hideplayer 1 // hide your own feet/player model in refraction views, this way you don't see half of your body under water
 r_water_refractdistort 0.019
 
 set cl_rainsnow_maxdrawdist 2048
 
-// equalize looks better than fullbright
-r_equalize_entities_fullbright 1
-
 // safe font defaults
 r_font_hinting 1
 r_font_disable_freetype 0