diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2015-12-05 21:05:10 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2015-12-05 21:05:10 +0100 |
commit | 21c41b7b5584e35edea66f66832a980363a95443 (patch) | |
tree | 95b1f5c6df096ad1f25af7b9ea8062f2915f07c6 /src/game | |
parent | dc5cc800f856c82f4f8961dd9c1225c3fa4670bc (diff) | |
parent | 3cc3a553cb8f00f60664189ec8d0e0c92d8344d6 (diff) |
Merge branch 'v11b'
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/bg_misc.c | 9 | ||||
-rw-r--r-- | src/game/bg_pmove.c | 60 | ||||
-rw-r--r-- | src/game/bg_public.h | 2 | ||||
-rw-r--r-- | src/game/g_buildable.c | 4 | ||||
-rw-r--r-- | src/game/g_main.c | 13 | ||||
-rw-r--r-- | src/game/g_public.h | 7 | ||||
-rw-r--r-- | src/game/g_syscalls.asm | 121 | ||||
-rw-r--r-- | src/game/g_syscalls.c | 16 | ||||
-rw-r--r-- | src/game/g_team.c | 2 |
9 files changed, 85 insertions, 149 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 8f6da8e..9a8cef1 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -4197,7 +4197,6 @@ void BG_PlayerStateToEntityState( playerState_t *ps, entityState_t *s, qboolean s->time2 = ps->movementDir; s->legsAnim = ps->legsAnim; s->torsoAnim = ps->torsoAnim; - s->weaponAnim = ps->weaponAnim; s->clientNum = ps->clientNum; // ET_PLAYER looks here instead of at number // so corpses can also reference the proper config s->eFlags = ps->eFlags; @@ -4297,7 +4296,6 @@ void BG_PlayerStateToEntityStateExtraPolate( playerState_t *ps, entityState_t *s s->time2 = ps->movementDir; s->legsAnim = ps->legsAnim; s->torsoAnim = ps->torsoAnim; - s->weaponAnim = ps->weaponAnim; s->clientNum = ps->clientNum; // ET_PLAYER looks here instead of at number // so corpses can also reference the proper config s->eFlags = ps->eFlags; @@ -5238,3 +5236,10 @@ qboolean BG_ForceFieldForEntity( playerState_t *ps, entityState_t *es, forceFiel return qfalse; } + +// missing syscalls + +int trap_S_SoundDuration( sfxHandle_t handle ) +{ + return 1000; +} diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c index f8f8a69..7af9a89 100644 --- a/src/game/bg_pmove.c +++ b/src/game/bg_pmove.c @@ -110,20 +110,6 @@ void PM_StartTorsoAnim( int anim ) /* =================== -PM_StartWeaponAnim -=================== -*/ -static void PM_StartWeaponAnim( int anim ) -{ - if( PM_Paralyzed( pm->ps->pm_type ) ) - return; - - pm->ps->weaponAnim = ( ( pm->ps->weaponAnim & ANIM_TOGGLEBIT ) ^ ANIM_TOGGLEBIT ) - | anim; -} - -/* -=================== PM_StartLegsAnim =================== */ @@ -191,19 +177,6 @@ static void PM_ContinueTorsoAnim( int anim ) /* =================== -PM_ContinueWeaponAnim -=================== -*/ -static void PM_ContinueWeaponAnim( int anim ) -{ - if( ( pm->ps->weaponAnim & ~ANIM_TOGGLEBIT ) == anim ) - return; - - PM_StartWeaponAnim( anim ); -} - -/* -=================== PM_ForceLegsAnim =================== */ @@ -2886,7 +2859,6 @@ static void PM_BeginWeaponChange( int weapon ) if( !( pm->ps->persistant[ PERS_STATE ] & PS_NONSEGMODEL ) ) { PM_StartTorsoAnim( TORSO_DROP ); - PM_StartWeaponAnim( WANIM_DROP ); } } @@ -2915,7 +2887,6 @@ static void PM_FinishWeaponChange( void ) if( !( pm->ps->persistant[ PERS_STATE ] & PS_NONSEGMODEL ) ) { PM_StartTorsoAnim( TORSO_RAISE ); - PM_StartWeaponAnim( WANIM_RAISE ); } } @@ -2945,8 +2916,6 @@ static void PM_TorsoAnimation( void ) PM_ContinueTorsoAnim( TORSO_STAND ); } } - - PM_ContinueWeaponAnim( WANIM_IDLE ); } } @@ -3225,8 +3194,6 @@ static void PM_Weapon( void ) PM_ContinueTorsoAnim( TORSO_STAND ); } - PM_ContinueWeaponAnim( WANIM_IDLE ); - return; } @@ -3278,7 +3245,6 @@ static void PM_Weapon( void ) //drop the weapon PM_StartTorsoAnim( TORSO_DROP ); - PM_StartWeaponAnim( WANIM_RELOAD ); pm->ps->weaponTime += BG_Weapon( pm->ps->weapon )->reloadTime; return; @@ -3531,17 +3497,14 @@ static void PM_Weapon( void ) { case WP_GRENADE: PM_StartTorsoAnim( TORSO_ATTACK3 ); - PM_StartWeaponAnim( WANIM_ATTACK1 ); break; case WP_BLASTER: PM_StartTorsoAnim( TORSO_ATTACK2 ); - PM_StartWeaponAnim( WANIM_ATTACK1 ); break; default: PM_StartTorsoAnim( TORSO_ATTACK ); - PM_StartWeaponAnim( WANIM_ATTACK1 ); break; } } @@ -3556,9 +3519,7 @@ static void PM_Weapon( void ) case WP_ALEVEL1: if( attack1 ) { - num /= RAND_MAX / 6 + 1; PM_ForceLegsAnim( NSPA_ATTACK1 ); - PM_StartWeaponAnim( WANIM_ATTACK1 + num ); } break; @@ -3566,38 +3527,31 @@ static void PM_Weapon( void ) if( attack2 ) { PM_ForceLegsAnim( NSPA_ATTACK2 ); - PM_StartWeaponAnim( WANIM_ATTACK7 ); } case WP_ALEVEL2: if( attack1 ) { - num /= RAND_MAX / 6 + 1; PM_ForceLegsAnim( NSPA_ATTACK1 ); - PM_StartWeaponAnim( WANIM_ATTACK1 + num ); } break; case WP_ALEVEL4: num /= RAND_MAX / 3 + 1; PM_ForceLegsAnim( NSPA_ATTACK1 + num ); - PM_StartWeaponAnim( WANIM_ATTACK1 + num ); break; default: if( attack1 ) { PM_ForceLegsAnim( NSPA_ATTACK1 ); - PM_StartWeaponAnim( WANIM_ATTACK1 ); } else if( attack2 ) { PM_ForceLegsAnim( NSPA_ATTACK2 ); - PM_StartWeaponAnim( WANIM_ATTACK2 ); } else if( attack3 ) { PM_ForceLegsAnim( NSPA_ATTACK3 ); - PM_StartWeaponAnim( WANIM_ATTACK3 ); } break; } @@ -3686,8 +3640,6 @@ static void PM_Animate( void ) if( pm->cmd.buttons & BUTTON_GESTURE ) { - if( pm->ps->tauntTimer > 0 ) - return; if( !( pm->ps->persistant[ PERS_STATE ] & PS_NONSEGMODEL ) ) { @@ -3695,7 +3647,6 @@ static void PM_Animate( void ) { PM_StartTorsoAnim( TORSO_GESTURE ); pm->ps->torsoTimer = TIMER_GESTURE; - pm->ps->tauntTimer = TIMER_GESTURE; PM_AddEvent( EV_TAUNT ); } @@ -3706,7 +3657,6 @@ static void PM_Animate( void ) { PM_ForceLegsAnim( NSPA_GESTURE ); pm->ps->torsoTimer = TIMER_GESTURE; - pm->ps->tauntTimer = TIMER_GESTURE; PM_AddEvent( EV_TAUNT ); } @@ -3750,16 +3700,6 @@ static void PM_DropTimers( void ) if( pm->ps->torsoTimer < 0 ) pm->ps->torsoTimer = 0; } - - if( pm->ps->tauntTimer > 0 ) - { - pm->ps->tauntTimer -= pml.msec; - - if( pm->ps->tauntTimer < 0 ) - { - pm->ps->tauntTimer = 0; - } - } } diff --git a/src/game/bg_public.h b/src/game/bg_public.h index f377739..9a2d464 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -32,7 +32,7 @@ TREMULOUS EDGE MOD SRC FILE // because games can change separately from the main system version, we need a // second version that must match between game and cgame -#define GAME_VERSION "base" +#define GAME_VERSION "newedge" #define DEFAULT_GRAVITY 800 #define VOTE_TIME 30000 // 30 seconds before vote times out diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 8de275e..1c161a6 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -3277,7 +3277,7 @@ void G_BuildableThink( gentity_t *ent, int msec ) ent->dcc = ( ent->buildableTeam != TEAM_HUMANS ) ? 0 : G_FindDCC( ent ); // Set health - ent->s.generic1 = MAX( ent->health, 0 ); + ent->s.constantLight = MAX( ent->health, 0 ); // Set flags ent->s.eFlags &= ~( EF_B_POWERED | EF_B_SPAWNED | EF_B_MARKED ); @@ -4459,7 +4459,7 @@ static gentity_t *G_Build( gentity_t *builder, buildable_t buildable, built->physicsBounce = BG_Buildable( buildable )->bounce; built->s.groundEntityNum = -1; - built->s.generic1 = MAX( built->health, 0 ); + built->s.constantLight = MAX( built->health, 0 ); if( BG_Buildable( buildable )->team == TEAM_ALIENS ) { diff --git a/src/game/g_main.c b/src/game/g_main.c index a07347e..65cdf87 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -2965,3 +2965,16 @@ void G_RunFrame( int levelTime ) level.frameMsec = trap_Milliseconds(); } +// missing syscalls + +void trap_SetConfigstringRestrictions( int num, const clientList_t *clientList ) +{ +} + +void trap_AddCommand( const char *cmdName ) +{ +} + +void trap_RemoveCommand( const char *cmdName ) +{ +} diff --git a/src/game/g_public.h b/src/game/g_public.h index 9512574..effbe37 100644 --- a/src/game/g_public.h +++ b/src/game/g_public.h @@ -159,8 +159,6 @@ typedef enum { G_GET_CONFIGSTRING, // ( int num, char *buffer, int bufferSize ); - G_SET_CONFIGSTRING_RESTRICTIONS, // ( int num, const clientList* clientList ); - G_GET_USERINFO, // ( int num, char *buffer, int bufferSize ); // userinfo strings are maintained by the server system, so they // are persistant across level loads, while all other game visible @@ -226,10 +224,7 @@ typedef enum { G_PARSE_READ_TOKEN, G_PARSE_SOURCE_FILE_AND_LINE, - G_SEND_GAMESTAT, - - G_ADDCOMMAND, - G_REMOVECOMMAND + G_SEND_GAMESTAT } gameImport_t; diff --git a/src/game/g_syscalls.asm b/src/game/g_syscalls.asm index f39b138..132ca1e 100644 --- a/src/game/g_syscalls.asm +++ b/src/game/g_syscalls.asm @@ -1,68 +1,65 @@ code -equ trap_Print -1 -equ trap_Error -2 -equ trap_Milliseconds -3 -equ trap_Cvar_Register -4 -equ trap_Cvar_Update -5 -equ trap_Cvar_Set -6 -equ trap_Cvar_VariableIntegerValue -7 -equ trap_Cvar_VariableStringBuffer -8 -equ trap_Argc -9 -equ trap_Argv -10 -equ trap_FS_FOpenFile -11 -equ trap_FS_Read -12 -equ trap_FS_Write -13 -equ trap_FS_FCloseFile -14 -equ trap_SendConsoleCommand -15 -equ trap_LocateGameData -16 -equ trap_DropClient -17 -equ trap_SendServerCommand -18 -equ trap_SetConfigstring -19 -equ trap_GetConfigstring -20 -equ trap_SetConfigstringRestrictions -21 -equ trap_GetUserinfo -22 -equ trap_SetUserinfo -23 -equ trap_GetServerinfo -24 -equ trap_SetBrushModel -25 -equ trap_Trace -26 -equ trap_PointContents -27 -equ trap_InPVS -28 -equ trap_InPVSIgnorePortals -29 -equ trap_AdjustAreaPortalState -30 -equ trap_AreasConnected -31 -equ trap_LinkEntity -32 -equ trap_UnlinkEntity -33 -equ trap_EntitiesInBox -34 -equ trap_EntityContact -35 -equ trap_GetUsercmd -36 -equ trap_GetEntityToken -37 -equ trap_FS_GetFileList -38 -equ trap_RealTime -39 -equ trap_SnapVector -40 -equ trap_TraceCapsule -41 -equ trap_EntityContactCapsule -42 -equ trap_FS_Seek -43 +equ trap_Print -1 +equ trap_Error -2 +equ trap_Milliseconds -3 +equ trap_Cvar_Register -4 +equ trap_Cvar_Update -5 +equ trap_Cvar_Set -6 +equ trap_Cvar_VariableIntegerValue -7 +equ trap_Cvar_VariableStringBuffer -8 +equ trap_Argc -9 +equ trap_Argv -10 +equ trap_FS_FOpenFile -11 +equ trap_FS_Read -12 +equ trap_FS_Write -13 +equ trap_FS_FCloseFile -14 +equ trap_SendConsoleCommand -15 +equ trap_LocateGameData -16 +equ trap_DropClient -17 +equ trap_SendServerCommand -18 +equ trap_SetConfigstring -19 +equ trap_GetConfigstring -20 +equ trap_GetUserinfo -21 +equ trap_SetUserinfo -22 +equ trap_GetServerinfo -23 +equ trap_SetBrushModel -24 +equ trap_Trace -25 +equ trap_PointContents -26 +equ trap_InPVS -27 +equ trap_InPVSIgnorePortals -28 +equ trap_AdjustAreaPortalState -29 +equ trap_AreasConnected -30 +equ trap_LinkEntity -31 +equ trap_UnlinkEntity -32 +equ trap_EntitiesInBox -33 +equ trap_EntityContact -34 +equ trap_GetUsercmd -35 +equ trap_GetEntityToken -36 +equ trap_FS_GetFileList -37 +equ trap_RealTime -38 +equ trap_SnapVector -39 +equ trap_TraceCapsule -40 +equ trap_EntityContactCapsule -41 +equ trap_FS_Seek -42 -equ trap_Parse_AddGlobalDefine -44 -equ trap_Parse_LoadSource -45 -equ trap_Parse_FreeSource -46 -equ trap_Parse_ReadToken -47 -equ trap_Parse_SourceFileAndLine -48 +equ trap_Parse_AddGlobalDefine -43 +equ trap_Parse_LoadSource -44 +equ trap_Parse_FreeSource -45 +equ trap_Parse_ReadToken -46 +equ trap_Parse_SourceFileAndLine -47 -equ trap_SendGameStat -49 +equ trap_SendGameStat -48 -equ trap_AddCommand -50 -equ trap_RemoveCommand -51 -equ memset -101 -equ memcpy -102 -equ strncpy -103 -equ sin -104 -equ cos -105 -equ atan2 -106 -equ sqrt -107 -equ floor -111 -equ ceil -112 -equ testPrintInt -113 -equ testPrintFloat -114 +equ memset -101 +equ memcpy -102 +equ strncpy -103 +equ sin -104 +equ cos -105 +equ atan2 -106 +equ sqrt -107 +equ floor -111 +equ ceil -112 +equ testPrintInt -113 +equ testPrintFloat -114 diff --git a/src/game/g_syscalls.c b/src/game/g_syscalls.c index 800bd2a..4ec48d3 100644 --- a/src/game/g_syscalls.c +++ b/src/game/g_syscalls.c @@ -151,11 +151,6 @@ void trap_GetConfigstring( int num, char *buffer, int bufferSize ) syscall( G_GET_CONFIGSTRING, num, buffer, bufferSize ); } -void trap_SetConfigstringRestrictions( int num, const clientList_t *clientList ) -{ - syscall( G_SET_CONFIGSTRING_RESTRICTIONS, num, clientList ); -} - void trap_GetUserinfo( int num, char *buffer, int bufferSize ) { syscall( G_GET_USERINFO, num, buffer, bufferSize ); @@ -290,14 +285,3 @@ int trap_Parse_SourceFileAndLine( int handle, char *filename, int *line ) { return syscall( G_PARSE_SOURCE_FILE_AND_LINE, handle, filename, line ); } - -void trap_AddCommand( const char *cmdName ) -{ - syscall( G_ADDCOMMAND, cmdName ); -} - -void trap_RemoveCommand( const char *cmdName ) -{ - syscall( G_REMOVECOMMAND, cmdName ); -} - diff --git a/src/game/g_team.c b/src/game/g_team.c index ad0873c..3246a4a 100644 --- a/src/game/g_team.c +++ b/src/game/g_team.c @@ -147,6 +147,7 @@ void G_UpdateTeamConfigStrings( void ) Com_Memset( &humanTeam, 0, sizeof( clientList_t ) ); } +/* trap_SetConfigstringRestrictions( CS_VOTE_TIME + TEAM_ALIENS, &humanTeam ); trap_SetConfigstringRestrictions( CS_VOTE_STRING + TEAM_ALIENS, &humanTeam ); trap_SetConfigstringRestrictions( CS_VOTE_YES + TEAM_ALIENS, &humanTeam ); @@ -159,6 +160,7 @@ void G_UpdateTeamConfigStrings( void ) trap_SetConfigstringRestrictions( CS_ALIEN_STAGES, &humanTeam ); trap_SetConfigstringRestrictions( CS_HUMAN_STAGES, &alienTeam ); +*/ } /* |