diff options
author | Christopher Schwarz <lakitu7@gmail.com> | 2009-10-03 13:10:33 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:32 +0000 |
commit | 3fd952a2fc79839dc2443e86a5bd5b9200db69fe (patch) | |
tree | d340aecb61ded55793ce90e24ef2a26b3911cc75 /src/game/bg_misc.c | |
parent | 1f2000da1ab287833af69689ddefb9fbf92039cb (diff) |
* Cleanup thirdperson spec code
- Remove the temporary manual override cvars
- Bring back cg_thirdpersonangle by request even though it's only useful in non-gameplay cases
- Move thirdperson view offset values to classconfigs where they belong
- Attempt once again to fix cg_thirdpersonpitchfollow
Diffstat (limited to 'src/game/bg_misc.c')
-rw-r--r-- | src/game/bg_misc.c | 73 |
1 files changed, 44 insertions, 29 deletions
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 5adbcd33..f41e07b5 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -1440,20 +1440,21 @@ static qboolean BG_ParseClassFile( const char *filename, classConfig_t *cc ) int defined = 0; enum { - MODEL = 1 << 0, - SKIN = 1 << 1, - HUD = 1 << 2, - MODELSCALE = 1 << 3, - SHADOWSCALE = 1 << 4, - MINS = 1 << 5, - MAXS = 1 << 6, - DEADMINS = 1 << 7, - DEADMAXS = 1 << 8, - CROUCHMAXS = 1 << 9, - VIEWHEIGHT = 1 << 10, - CVIEWHEIGHT = 1 << 11, - ZOFFSET = 1 << 12, - NAME = 1 << 13 + MODEL = 1 << 0, + SKIN = 1 << 1, + HUD = 1 << 2, + MODELSCALE = 1 << 3, + SHADOWSCALE = 1 << 4, + MINS = 1 << 5, + MAXS = 1 << 6, + DEADMINS = 1 << 7, + DEADMAXS = 1 << 8, + CROUCHMAXS = 1 << 9, + VIEWHEIGHT = 1 << 10, + CVIEWHEIGHT = 1 << 11, + ZOFFSET = 1 << 12, + NAME = 1 << 13, + SHOULDEROFFSETS = 1 << 14 }; // load the file @@ -1662,27 +1663,41 @@ static qboolean BG_ParseClassFile( const char *filename, classConfig_t *cc ) defined |= NAME; continue; } + else if( !Q_stricmp( token, "shoulderOffsets" ) ) + { + for( i = 0; i <= 2; i++ ) + { + token = COM_Parse( &text_p ); + if( !token ) + break; + + cc->shoulderOffsets[ i ] = atof( token ); + } + defined |= SHOULDEROFFSETS; + continue; + } Com_Printf( S_COLOR_RED "ERROR: unknown token '%s'\n", token ); return qfalse; } - if( !( defined & MODEL ) ) token = "model"; - else if( !( defined & SKIN ) ) token = "skin"; - else if( !( defined & HUD ) ) token = "hud"; - else if( !( defined & MODELSCALE ) ) token = "modelScale"; - else if( !( defined & SHADOWSCALE ) ) token = "shadowScale"; - else if( !( defined & MINS ) ) token = "mins"; - else if( !( defined & MAXS ) ) token = "maxs"; - else if( !( defined & DEADMINS ) ) token = "deadMins"; - else if( !( defined & DEADMAXS ) ) token = "deadMaxs"; - else if( !( defined & CROUCHMAXS ) ) token = "crouchMaxs"; - else if( !( defined & VIEWHEIGHT ) ) token = "viewheight"; - else if( !( defined & CVIEWHEIGHT ) ) token = "crouchViewheight"; - else if( !( defined & ZOFFSET ) ) token = "zOffset"; - else if( !( defined & NAME ) ) token = "name"; - else token = ""; + if( !( defined & MODEL ) ) token = "model"; + else if( !( defined & SKIN ) ) token = "skin"; + else if( !( defined & HUD ) ) token = "hud"; + else if( !( defined & MODELSCALE ) ) token = "modelScale"; + else if( !( defined & SHADOWSCALE ) ) token = "shadowScale"; + else if( !( defined & MINS ) ) token = "mins"; + else if( !( defined & MAXS ) ) token = "maxs"; + else if( !( defined & DEADMINS ) ) token = "deadMins"; + else if( !( defined & DEADMAXS ) ) token = "deadMaxs"; + else if( !( defined & CROUCHMAXS ) ) token = "crouchMaxs"; + else if( !( defined & VIEWHEIGHT ) ) token = "viewheight"; + else if( !( defined & CVIEWHEIGHT ) ) token = "crouchViewheight"; + else if( !( defined & ZOFFSET ) ) token = "zOffset"; + else if( !( defined & NAME ) ) token = "name"; + else if( !( defined & SHOULDEROFFSETS ) ) token = "shoulderOffsets"; + else token = ""; if( strlen( token ) > 0 ) { |