diff options
author | Tim Angus <tim@ngus.net> | 2007-09-25 19:52:36 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2007-09-25 19:52:36 +0000 |
commit | 899c8bb46cd255f821b1ffd09c668d730f5da8c9 (patch) | |
tree | 24cbe8d8b8c04391cc52b7e6faca0ec171777341 /src/cgame/cg_tutorial.c | |
parent | b440cc296c43290906d9ab2d556377fd1d1fbfed (diff) |
* Remove B_REMOVED_TOGGLEBIT, use ps->misc per player instead
* Fix last spawn and uniqueness tests for marked deconstruction
* Fix buildable collision tests for non-marked deconstruction
* New g_markDeconstruct settings to guard against abuse
+ 0 off
+ 1 on, no replacements allowed
+ 2 on, replacements allowed of same type
+ 3 on, any replacements allowed
* Unlink then relink all buildables when doing build tests
* Fixes to tutorial text for marked deconstruction
* Remove unused "weaponswitch" client command
Diffstat (limited to 'src/cgame/cg_tutorial.c')
-rw-r--r-- | src/cgame/cg_tutorial.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/cgame/cg_tutorial.c b/src/cgame/cg_tutorial.c index 888e9e1a..9997abcd 100644 --- a/src/cgame/cg_tutorial.c +++ b/src/cgame/cg_tutorial.c @@ -351,8 +351,9 @@ CG_HumanCkitText */ static void CG_HumanCkitText( char *text, playerState_t *ps ) { - buildable_t buildable = ps->stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT; - float health; + buildable_t buildable = ps->stats[ STAT_BUILDABLE ] & ~SB_VALID_TOGGLEBIT; + entityState_t *es; + float health; if( buildable > BA_NONE ) { @@ -380,7 +381,28 @@ static void CG_HumanCkitText( char *text, playerState_t *ps ) va( "Hold %s to repair this structure\n", CG_KeyNameForCommand( "+button5" ) ) ); } + } + } + if( ( es = CG_BuildableInRange( ps, NULL ) ) ) + { + if( cgs.markDeconstruct ) + { + if( es->generic1 & B_MARKED_TOGGLEBIT ) + { + Q_strcat( text, MAX_TUTORIAL_TEXT, + va( "Press %s to unmark this structure\n", + CG_KeyNameForCommand( "deconstruct" ) ) ); + } + else + { + Q_strcat( text, MAX_TUTORIAL_TEXT, + va( "Press %s to mark this structure\n", + CG_KeyNameForCommand( "deconstruct" ) ) ); + } + } + else + { Q_strcat( text, MAX_TUTORIAL_TEXT, va( "Press %s to destroy this structure\n", CG_KeyNameForCommand( "deconstruct" ) ) ); |