when calling hooks, use a final \n and not ;
authorRudolf Polzer <divverent@alientrap.org>
Fri, 2 Jul 2010 11:50:56 +0000 (13:50 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 2 Jul 2010 11:50:56 +0000 (13:50 +0200)
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/server/clientcommands.qc
qcsrc/server/g_world.qc

index b34e843793311ddfc9a13b9dcd3450daf24409a7..1a6996ce666bebecedf9b82fd052cca27b0856bd 100644 (file)
@@ -212,9 +212,9 @@ void CSQC_Shutdown(void)
        if not(isdemo())
        {
                if not(calledhooks & HOOK_START)
-                       localcmd("\n_cl_hook_gamestart nop;");
+                       localcmd("\n_cl_hook_gamestart nop\n");
                if not(calledhooks & HOOK_END)
-                       localcmd("\ncl_hook_gameend;");
+                       localcmd("\ncl_hook_gameend\n");
        }
 }
 
@@ -964,7 +964,7 @@ void Gamemode_Init()
 
        if not(isdemo())
        {
-               localcmd("\n_cl_hook_gamestart ", GametypeNameFromType(gametype), ";");
+               localcmd("\n_cl_hook_gamestart ", GametypeNameFromType(gametype), "\n");
                calledhooks |= HOOK_START;
        }
 }
index fa69f4aab0de452903009a2f1e7a5c007644a2d7..0ec4277b6bf4e9f49ff50ff5a1d05a3a96fc41bd 100644 (file)
@@ -435,7 +435,7 @@ void CSQC_UpdateView(float w, float h)
        if(intermission && !isdemo() && !(calledhooks & HOOK_END))
                if(calledhooks & HOOK_START)
                {
-                       localcmd("\ncl_hook_gameend;");
+                       localcmd("\ncl_hook_gameend\n");
                        calledhooks |= HOOK_END;
                }
 
@@ -481,9 +481,9 @@ void CSQC_UpdateView(float w, float h)
                entity e;
                e = get_weaponinfo(activeweapon);
                if(e.netname != "")
-                       localcmd(strcat("\ncl_hook_activeweapon ", e.netname), ";");
+                       localcmd(strcat("\ncl_hook_activeweapon ", e.netname), "\n");
                else
-                       localcmd("\ncl_hook_activeweapon none;");
+                       localcmd("\ncl_hook_activeweapon none\n");
        }
 
        // ALWAYS Clear Current Scene First
index ff5794dae989397d202294c1641844ee7b678e57..171906428a39b2a29f146d811f3d97927a516196 100644 (file)
@@ -486,7 +486,7 @@ void ReadyRestart()
        if(g_arena | g_assault | gameover | intermission_running | race_completing)
                localcmd("restart\n");
        else
-               localcmd("\nsv_hook_gamerestart;");
+               localcmd("\nsv_hook_gamerestart\n");
 
        ReadyRestartForce();
 
index 90a1e744f923a1701da7d93c1eef474c4ad5d199..a5165706bae3f9351e22be5d9b48a2f571a79f16 100644 (file)
@@ -699,7 +699,7 @@ void spawnfunc_worldspawn (void)
 
        CheatInit();
 
-       localcmd("\n_sv_hook_gamestart ", GetGametype(), ";");
+       localcmd("\n_sv_hook_gamestart ", GetGametype(), "\n");
 
        world_initialized = 1;
 }
@@ -1427,7 +1427,7 @@ void NextLevel()
        if(cvar("g_campaign"))
                CampaignPreIntermission();
 
-       localcmd("\nsv_hook_gameend;");
+       localcmd("\nsv_hook_gameend\n");
 }
 
 /*