This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit e1dd82b2335d9cdd663b224b2a0b38acfd8bf97e
Author: m4n4t4...@gmail.com 
<m4n4t4...@gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Thu Sep 11 23:21:17 2014 +0000

    SP: Fix building / loading QVMs (Still not fully working)
---
 SP/code/game/g_func_decs.h | 4 ++++
 SP/code/game/g_funcs.h     | 4 ++++
 SP/code/game/g_syscalls.c  | 9 ++++++---
 SP/code/qcommon/files.c    | 4 ++--
 SP/code/qcommon/vm.c       | 2 +-
 SP/code/server/sv_client.c | 4 ++--
 6 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/SP/code/game/g_func_decs.h b/SP/code/game/g_func_decs.h
index d2c0ba7..0c0047d 100644
--- a/SP/code/game/g_func_decs.h
+++ b/SP/code/game/g_func_decs.h
@@ -104,7 +104,9 @@ extern void AxisToAngles ( vec3_t axis [ 3 ] , vec3_t 
angles ) ;
 extern float vectoyaw ( const vec3_t vec ) ;
 extern void ProjectPointOntoVector ( vec3_t point , vec3_t vStart , vec3_t 
vEnd , vec3_t vProj ) ;
 extern void GetPerpendicularViewVector ( const vec3_t point , const vec3_t p1 
, const vec3_t p2 , vec3_t up ) ;
+#ifndef Q3_VM
 extern float Q_acos ( float c ) ;
+#endif
 extern int Q_isnan ( float x ) ;
 extern void PerpendicularVector ( vec3_t dst , const vec3_t src ) ;
 extern void AngleVectors ( const vec3_t angles , vec3_t forward , vec3_t right 
, vec3_t up ) ;
@@ -552,8 +554,10 @@ extern int trap_Milliseconds ( void ) ;
 extern void trap_Endgame ( void ) ;
 extern void trap_Error ( const char * text ) ;
 extern void trap_Print ( const char * text ) ;
+#ifndef Q3_VM
 extern int PASSFLOAT ( float x ) ;
 extern Q_EXPORT void dllEntry ( intptr_t ( QDECL * syscallptr ) ( intptr_t arg 
, ... ) ) ;
+#endif
 extern qboolean ConsoleCommand ( void ) ;
 extern void Svcmd_ForceTeam_f ( void ) ;
 extern gclient_t * ClientForString ( const char * s ) ;
diff --git a/SP/code/game/g_funcs.h b/SP/code/game/g_funcs.h
index b950186..46ac94a 100644
--- a/SP/code/game/g_funcs.h
+++ b/SP/code/game/g_funcs.h
@@ -104,7 +104,9 @@ If you have questions concerning this license or the 
applicable additional terms
 {"vectoyaw", (byte *)vectoyaw},
 {"ProjectPointOntoVector", (byte *)ProjectPointOntoVector},
 {"GetPerpendicularViewVector", (byte *)GetPerpendicularViewVector},
+#ifndef Q3_VM
 {"Q_acos", (byte *)Q_acos},
+#endif
 {"Q_isnan", (byte *)Q_isnan},
 {"PerpendicularVector", (byte *)PerpendicularVector},
 {"AngleVectors", (byte *)AngleVectors},
@@ -552,8 +554,10 @@ If you have questions concerning this license or the 
applicable additional terms
 {"trap_Endgame", (byte *)trap_Endgame},
 {"trap_Error", (byte *)trap_Error},
 {"trap_Print", (byte *)trap_Print},
+#ifndef Q3_VM
 {"PASSFLOAT", (byte *)PASSFLOAT},
 {"dllEntry", (byte *)dllEntry},
+#endif
 {"ConsoleCommand", (byte *)ConsoleCommand},
 {"Svcmd_ForceTeam_f", (byte *)Svcmd_ForceTeam_f},
 {"ClientForString", (byte *)ClientForString},
diff --git a/SP/code/game/g_syscalls.c b/SP/code/game/g_syscalls.c
index 3738610..e61ec8f 100644
--- a/SP/code/game/g_syscalls.c
+++ b/SP/code/game/g_syscalls.c
@@ -32,6 +32,9 @@ If you have questions concerning this license or the 
applicable additional terms
 
 // this file is only included when building a dll
 // g_syscalls.asm is included instead when building a qvm
+#ifdef Q3_VM
+#error "Do not use in VM build"
+#endif
 
 static intptr_t (QDECL *syscall)( intptr_t arg, ... ) = (intptr_t (QDECL *)( 
intptr_t, ...))-1;
 
@@ -517,9 +520,9 @@ float trap_Characteristic_Float( int character, int index ) 
{
 }
 
 float trap_Characteristic_BFloat( int character, int index, float min, float 
max ) {
-       int temp;
-       temp = syscall( BOTLIB_AI_CHARACTERISTIC_BFLOAT, character, index, 
PASSFLOAT( min ), PASSFLOAT( max ) );
-       return ( *(float*)&temp );
+       floatint_t fi;
+       fi.i = syscall( BOTLIB_AI_CHARACTERISTIC_BFLOAT, character, index, 
PASSFLOAT( min ), PASSFLOAT( max ) );
+       return fi.f;
 }
 
 int trap_Characteristic_Integer( int character, int index ) {
diff --git a/SP/code/qcommon/files.c b/SP/code/qcommon/files.c
index 4910e5d..7af950a 100644
--- a/SP/code/qcommon/files.c
+++ b/SP/code/qcommon/files.c
@@ -1427,10 +1427,10 @@ long FS_FOpenFileReadDir(const char *filename, 
searchpath_t *search, fileHandle_
                                        if(strstr(filename, Sys_GetDLLName( 
"ui" )))
                                                pak->referenced |= FS_UI_REF;
 
-                                       if(strstr(filename, "cgame.mp.qvm"))
+                                       if(strstr(filename, "cgame.sp.qvm"))
                                                pak->referenced |= FS_CGAME_REF;
 
-                                       if(strstr(filename, "ui.mp.qvm"))
+                                       if(strstr(filename, "ui.sp.qvm"))
                                                pak->referenced |= FS_UI_REF;
 
                                        if(uniqueFILE)
diff --git a/SP/code/qcommon/vm.c b/SP/code/qcommon/vm.c
index e57a180..a72ed47 100644
--- a/SP/code/qcommon/vm.c
+++ b/SP/code/qcommon/vm.c
@@ -378,7 +378,7 @@ vmHeader_t *VM_LoadQVM( vm_t *vm, qboolean alloc, qboolean 
unpure)
        } header;
 
        // load the image
-       Com_sprintf( filename, sizeof(filename), "vm/%s.qvm", vm->name );
+       Com_sprintf( filename, sizeof(filename), "vm/%s.sp.qvm", vm->name );
        Com_Printf( "Loading vm file %s...\n", filename );
 
        FS_ReadFileDir(filename, vm->searchPath, unpure, &header.v);
diff --git a/SP/code/server/sv_client.c b/SP/code/server/sv_client.c
index cd049c8..b1ab870 100644
--- a/SP/code/server/sv_client.c
+++ b/SP/code/server/sv_client.c
@@ -1226,9 +1226,9 @@ static void SV_VerifyPaks_f( client_t *cl ) {
 
                nChkSum1 = nChkSum2 = 0;
                // we run the game, so determine which cgame and ui the client 
"should" be running
-               bGood = ( FS_FileIsInPAK( "vm/cgame.qvm", &nChkSum1 ) == 1 );
+               bGood = ( FS_FileIsInPAK( "vm/cgame.sp.qvm", &nChkSum1 ) == 1 );
                if ( bGood ) {
-                       bGood = ( FS_FileIsInPAK( "vm/ui.qvm", &nChkSum2 ) == 1 
);
+                       bGood = ( FS_FileIsInPAK( "vm/ui.sp.qvm", &nChkSum2 ) 
== 1 );
                }
 
                nClientPaks = Cmd_Argc();

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/iortcw.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to