]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix GAME_XONOTIC beging misplaced in gamemode_t->gamemode_info causing "gamemode...
authorvortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 21 Sep 2010 21:49:23 +0000 (21:49 +0000)
committervortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 21 Sep 2010 21:49:23 +0000 (21:49 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10478 d7cf8633-e32d-0410-b094-e92efae38249

common.h
csprogs.c
dpdefs/csprogsdefs.qc
progsvm.h
prvm_edict.c

index f8cba1a3b0801a726ebb151f286ae2cbd2332729..0902ca775be323de68360f7b1bd331c229cf9f6f 100644 (file)
--- a/common.h
+++ b/common.h
@@ -252,6 +252,7 @@ typedef enum gamemode_e
        GAME_ROGUE,
        GAME_NEHAHRA,
        GAME_NEXUIZ,
+       GAME_XONOTIC,
        GAME_TRANSFUSION,
        GAME_GOODVSBAD2,
        GAME_TEU,
@@ -273,7 +274,6 @@ typedef enum gamemode_e
        GAME_BLOODOMNICIDE,
        GAME_STEELSTORM, // added by motorsep
        GAME_STRAPBOMB, // added by motorsep for Urre
-       GAME_XONOTIC,
        GAME_COUNT
 }
 gamemode_t;
index aa438a52a89e14546d58c2ba8c41cedd49589110..33f2987f5b1f72cea8a45ee3d26d2f43affc787e 100644 (file)
--- a/csprogs.c
+++ b/csprogs.c
@@ -123,6 +123,10 @@ static void CSQC_SetGlobals (void)
 
                if ((val = PRVM_GLOBALFIELDVALUE(prog->globaloffsets.view_angles)))
                        VectorCopy(cl.viewangles, val->vector);
+               if ((val = PRVM_GLOBALFIELDVALUE(prog->globaloffsets.view_punchangle)))
+                       VectorCopy(cl.punchangle, val->vector);
+               if ((val = PRVM_GLOBALFIELDVALUE(prog->globaloffsets.view_punchvector)))
+                       VectorCopy(cl.punchvector, val->vector);
                prog->globals.client->maxclients = cl.maxclients;
        CSQC_END
 }
index 2c2d0d1ab1545647bc453d27613dcf854ecc6ea4..1a6847fc1e0aa3feefb27de90dada3738a8426a6 100644 (file)
@@ -147,6 +147,10 @@ void               end_sys_fields;                 // flag for structure dumping
 // Additional OPTIONAL Fields and Globals
 float          intermission;
 
+vector         view_angles; // same as input_angles
+vector         view_punchangle;
+vector         view_punchvector;
+
 /*
 ==============================================================================
 
index 85610510a34a07ea3a623ab00eee037b26276998..5bf4080d78bcb60e18ffdab93ff700b6b0b65a95 100644 (file)
--- a/progsvm.h
+++ b/progsvm.h
@@ -288,6 +288,8 @@ typedef struct prvm_prog_globaloffsets_s
        int v_right; // ssqc / csqc
        int v_up; // ssqc / csqc
        int view_angles; // csqc
+       int view_punchangle; // csqc
+       int view_punchvector; // csqc
        int trace_allsolid; // ssqc / csqc
        int trace_startsolid; // ssqc / csqc
        int trace_fraction; // ssqc / csqc
index 793b75e21ff59775a78e2440b3c224648ca4c3f5..7a81d008c498be1caa1ba29c08dafce5311f9294 100644 (file)
@@ -1730,6 +1730,8 @@ void PRVM_FindOffsets(void)
        prog->globaloffsets.v_right                       = PRVM_ED_FindGlobalOffset("v_right");
        prog->globaloffsets.v_up                          = PRVM_ED_FindGlobalOffset("v_up");
        prog->globaloffsets.view_angles                   = PRVM_ED_FindGlobalOffset("view_angles");
+       prog->globaloffsets.view_punchangle               = PRVM_ED_FindGlobalOffset("view_punchangle");
+       prog->globaloffsets.view_punchvector              = PRVM_ED_FindGlobalOffset("view_punchvector");
        prog->globaloffsets.worldstatus                   = PRVM_ED_FindGlobalOffset("worldstatus");
        prog->globaloffsets.particles_alphamin            = PRVM_ED_FindGlobalOffset("particles_alphamin");
        prog->globaloffsets.particles_alphamax            = PRVM_ED_FindGlobalOffset("particles_alphamax");