summaryrefslogtreecommitdiff
path: root/src/cgame
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2003-08-12 22:12:04 +0000
committerTim Angus <tim@ngus.net>2003-08-12 22:12:04 +0000
commita2b05468b75fed034e54cc79615c07fb2d3d6486 (patch)
treedb0dd75a60dde04a96133fc53d7ec7e985e490c8 /src/cgame
parentd8289eef899a0be82afbe22501f39f20e5b25d90 (diff)
* Bug fix to listbox reset feature
* Client side creep significantly reworked * MinNormal is actually tested for now * Overmind no longer attacks after dying * Some internal hivemind->overmind confusion fixups
Diffstat (limited to 'src/cgame')
-rw-r--r--src/cgame/cg_buildable.c54
-rw-r--r--src/cgame/cg_local.h5
-rw-r--r--src/cgame/cg_servercmds.c4
3 files changed, 56 insertions, 7 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c
index 2f85d48a..a75169da 100644
--- a/src/cgame/cg_buildable.c
+++ b/src/cgame/cg_buildable.c
@@ -34,6 +34,60 @@ char *cg_buildableSoundNames[ MAX_BUILDABLE_ANIMATIONS ] =
sfxHandle_t defaultAlienSounds[ MAX_BUILDABLE_ANIMATIONS ];
sfxHandle_t defaultHumanSounds[ MAX_BUILDABLE_ANIMATIONS ];
+#define CREEP_SCALEUP_TIME 3000
+#define CREEP_SCALEDOWN_TIME 3000
+#define CREEP_SIZE 64.0f
+
+/*
+==================
+CG_Creep
+==================
+*/
+static void CG_Creep( centity_t *cent )
+{
+ polyVert_t verts[ 4 ];
+ vec3_t square[ 4 ];
+ vec2_t tex[ 4 ];
+ int i, msec, seed;
+ float size, newsize, frac;
+ float length;
+ trace_t tr, tr2;
+ vec3_t temp, origin, p1, p2;
+ int creepSize = BG_FindCreepSizeForBuildable( cent->currentState.clientNum );
+
+ //should the creep be growing or receding?
+ if( cent->miscTime >= 0 )
+ {
+ msec = cg.time - cent->miscTime;
+ if( msec >= 0 && msec < CREEP_SCALEUP_TIME )
+ frac = (float)msec / CREEP_SCALEUP_TIME;
+ else
+ frac = 1.0f;
+ }
+ else if( cent->miscTime < 0 )
+ {
+ msec = cg.time + cent->miscTime;
+ if( msec >= 0 && msec < CREEP_SCALEDOWN_TIME )
+ frac = 1.0f - ( (float)msec / CREEP_SCALEDOWN_TIME );
+ else
+ frac = 0.0f;
+ }
+
+ VectorCopy( cent->currentState.origin2, temp );
+ VectorScale( temp, -4096, temp );
+ VectorAdd( temp, cent->lerpOrigin, temp );
+
+ CG_Trace( &tr, cent->lerpOrigin, NULL, NULL, temp, cent->currentState.number, MASK_SOLID );
+
+ VectorCopy( tr.endpos, origin );
+
+ size = CREEP_SIZE * frac;
+
+ if( size > 0.0f )
+ CG_ImpactMark( cgs.media.greenBloodMarkShader, origin, cent->currentState.origin2,
+ 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, qfalse, size, qtrue );
+}
+
/*
======================
CG_ParseBuildableAnimationFile
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index 3d580b4c..f4663f80 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -1347,11 +1347,6 @@ void CG_DrawItemSelectText( rectDef_t *rect, float scale, int textStyle )
//
-// cg_creep.c
-//
-void CG_Creep( centity_t *cent );
-
-//
// cg_scanner.c
//
void CG_Scanner( rectDef_t *rect, qhandle_t shader );
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c
index b469d0f1..8e9cba9f 100644
--- a/src/cgame/cg_servercmds.c
+++ b/src/cgame/cg_servercmds.c
@@ -624,7 +624,7 @@ void CG_Menu( int menu )
trap_SendConsoleCommand( "menu tremulous_alien_dialog\n" );
break;
- case MN_A_NOHVMND:
+ case MN_A_NOOVMND:
trap_Cvar_Set( "ui_dialog", "There is no Overmind. An Overmind must be built to control "
"the structure you tried to place" );
trap_SendConsoleCommand( "menu tremulous_alien_dialog\n" );
@@ -636,7 +636,7 @@ void CG_Menu( int menu )
trap_SendConsoleCommand( "menu tremulous_alien_dialog\n" );
break;
- case MN_A_HIVEMIND:
+ case MN_A_OVERMIND:
trap_Cvar_Set( "ui_dialog", "There can only be one Overmind. Destroy the existing one if you "
"wish to move it." );
trap_SendConsoleCommand( "menu tremulous_alien_dialog\n" );