summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2015-06-25 22:52:39 +0200
committerPaweł Redman <pawel.redman@gmail.com>2015-06-25 22:52:39 +0200
commit6c7152aada204bfdfa6e39cdfea5e10440e0ed36 (patch)
tree1d2c8e17b47abc796de1f0e045abf3fb043d07df
parent1b13c257a9759f0a40c79f0acd3a07bc079df120 (diff)
Bring back some Basilisk code as a base for Wraith.
-rw-r--r--assets/configs/classes/level1.cfg17
-rw-r--r--assets/models/players/level1/animation.cfg48
-rw-r--r--assets/models/weapons/level1/weapon.cfg19
-rw-r--r--src/cgame/cg_event.c6
-rw-r--r--src/cgame/cg_tutorial.c23
-rw-r--r--src/game/bg_misc.c58
-rw-r--r--src/game/bg_mod.h1
-rw-r--r--src/game/bg_pmove.c9
-rw-r--r--src/game/bg_public.h2
-rw-r--r--src/game/g_csw.h1
-rw-r--r--src/game/g_weapon.c4
-rw-r--r--src/game/tremulous.h16
12 files changed, 202 insertions, 2 deletions
diff --git a/assets/configs/classes/level1.cfg b/assets/configs/classes/level1.cfg
new file mode 100644
index 0000000..0f146c1
--- /dev/null
+++ b/assets/configs/classes/level1.cfg
@@ -0,0 +1,17 @@
+name "Wraith"
+model level1
+modelScale 1.0
+skin default
+shadowScale 1.0
+hud alien_general_hud
+
+mins -18 -18 -18
+maxs 18 18 18
+crouchMaxs 18 18 18
+deadMins -18 -18 -4
+deadMaxs 18 18 4
+zOffset 0.0
+
+viewheight 0
+crouchViewheight 0
+shoulderOffsets -10 0 18
diff --git a/assets/models/players/level1/animation.cfg b/assets/models/players/level1/animation.cfg
new file mode 100644
index 0000000..248bf6c
--- /dev/null
+++ b/assets/models/players/level1/animation.cfg
@@ -0,0 +1,48 @@
+// animation config file
+// Tremulous: level1 alien
+
+sex n
+
+// first frame, num frames, looping frames, frames per second
+
+footsteps flesh
+
+nonsegmented
+
+0 40 40 30 //NSPA_STAND
+
+41 141 0 60 //NSPA_GESTURE
+
+182 31 31 30 //NSPA_WALK
+182 31 31 60 //NSPA_RUN
+182 -31 31 60 //NSPA_RUNBACK
+
+0 0 0 30 //NSPA_CHARGE
+
+213 31 31 60 //NSPA_RUNLEFT
+213 31 31 30 //NSPA_WALKLEFT
+244 31 31 60 //NSPA_RUNRIGHT
+244 31 31 30 //NSPA_WALKRIGHT
+
+182 31 31 30 //NSPA_SWIM
+
+275 41 20 30 //NSPA_JUMP
+316 20 0 30 //NSPA_LAND
+275 41 20 30 //NSPA_JUMPBACK
+316 20 0 30 //NSPA_LANDBACK
+
+182 31 31 30 //NSPA_TURN
+
+336 31 0 30 //NSPA_ATTACK1
+336 31 0 30 //NSPA_ATTACK2
+336 31 0 30 //NSPA_ATTACK3
+
+367 11 0 30 //NSPA_PAIN1
+367 11 0 30 //NSPA_PAIN2
+
+378 41 0 30 //NSPA_DEATH1
+418 1 0 30 //NSPA_DEAD1
+378 41 0 30 //NSPA_DEATH2
+418 1 0 30 //NSPA_DEAD2
+378 41 0 30 //NSPA_DEATH3
+418 1 0 30 //NSPA_DEAD3
diff --git a/assets/models/weapons/level1/weapon.cfg b/assets/models/weapons/level1/weapon.cfg
new file mode 100644
index 0000000..db17776
--- /dev/null
+++ b/assets/models/weapons/level1/weapon.cfg
@@ -0,0 +1,19 @@
+disableIn3rdPerson
+crosshair 15 gfx/2d/crosshair-alien_s
+
+icon icons/icona_lev1
+
+primary
+{
+ flashSound 0 models/weapons/level1/flash0.wav
+ impactFleshSound 0 models/weapons/level1/impactflesh0.wav
+ alwaysImpact
+}
+
+tertiary
+{
+ missileModel models/weapons/acidbomb/acid.md3
+ flashSound 0 models/weapons/level1/bomb.wav
+ impactSound 0 sound/misc/abomb_explode.wav
+ impactParticleSystem models/weapons/acidbomb/impactPS
+}
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c
index 7e20cc5..436e819 100644
--- a/src/cgame/cg_event.c
+++ b/src/cgame/cg_event.c
@@ -361,6 +361,12 @@ static void CG_Obituary( entityState_t *ent )
case MOD_LEVEL0_BITE:
message = "^5was bitten by^7";
break;
+ case MOD_LEVEL1_CLAW:
+ message = "^5was swiped by^7";
+ Com_sprintf( className, 64, "^5's %s",
+ BG_ClassConfig( PCL_ALIEN_LEVEL1 )->humanName );
+ message2 = className;
+ break;
case MOD_LEVEL2_CLAW:
case MOD_LEVEL2_CLAW_UPG:
message = "^5was clawed by^7";
diff --git a/src/cgame/cg_tutorial.c b/src/cgame/cg_tutorial.c
index 0819892..b44b2f1 100644
--- a/src/cgame/cg_tutorial.c
+++ b/src/cgame/cg_tutorial.c
@@ -258,6 +258,25 @@ static void CG_AlienLevel0Text( char *text, playerState_t *ps )
/*
===============
+CG_AlienLevel1Text
+===============
+*/
+static void CG_AlienLevel1Text( char *text, playerState_t *ps )
+{
+ Q_strcat( text, MAX_TUTORIAL_TEXT,
+ "Touch humans to grab them\n" );
+
+ Q_strcat( text, MAX_TUTORIAL_TEXT,
+ va( "Press %s to swipe\n",
+ CG_KeyNameForCommand( "+attack" ) ) );
+
+ Q_strcat( text, MAX_TUTORIAL_TEXT,
+ va( "Press %s to walk on walls\n",
+ CG_KeyNameForCommand( "+movedown" ) ) );
+}
+
+/*
+===============
CG_AlienLevel2Text
===============
*/
@@ -631,6 +650,10 @@ const char *CG_TutorialText( void )
CG_AlienLevel0Text( text, ps );
break;
+ case PCL_ALIEN_LEVEL1:
+ CG_AlienLevel1Text( text, ps );
+ break;
+
case PCL_ALIEN_LEVEL2:
case PCL_ALIEN_LEVEL2_UPG:
CG_AlienLevel2Text( text, ps );
diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c
index 0780ab8..33d4138 100644
--- a/src/game/bg_misc.c
+++ b/src/game/bg_misc.c
@@ -2253,11 +2253,42 @@ static const classAttributes_t bg_classList[ ] =
400.0f, //float stopSpeed;
250.0f, //float jumpMagnitude;
2.0f, //float knockbackScale;
- { PCL_ALIEN_LEVEL2, PCL_NONE }, //int children[ 3 ];
+ { PCL_ALIEN_LEVEL1, PCL_NONE }, //int children[ 3 ];
LEVEL0_COST, //int cost;
LEVEL0_VALUE, //int value;
},
{
+ PCL_ALIEN_LEVEL1, //int classnum;
+ "level1", //char *classname;
+ "A support class able to crawl on walls and ceilings. Its melee "
+ "attack is most effective when combined with the ability to grab "
+ "and hold its victims in place. Provides a weak healing aura "
+ "that accelerates the healing rate of nearby aliens. It also has "
+ "an acid bomb that can be used to deal moderate area damage. "
+ "The basilisk is also resistant to flamer.",
+ STAGE_GE_1, //int stages
+ LEVEL1_HEALTH, //int health;
+ 0.0f, //float fallDamage;
+ LEVEL1_REGEN, //float regenRate;
+ SCA_FOVWARPS|SCA_WALLCLIMBER|SCA_ALIENSENSE, //int abilities;
+ WP_ALEVEL1, //weapon_t startWeapon
+ 0.0f, //float buildDist;
+ 120, //int fov;
+ 0.001f, //float bob;
+ 1.8f, //float bobCycle;
+ 60, //int steptime;
+ LEVEL1_SPEED, //float speed;
+ 10.0f, //float acceleration;
+ 1.0f, //float airAcceleration;
+ 6.0f, //float friction;
+ 300.0f, //float stopSpeed;
+ 310.0f, //float jumpMagnitude;
+ 1.2f, //float knockbackScale;
+ { PCL_ALIEN_LEVEL2, PCL_NONE, PCL_NONE }, //int children[ 3 ];
+ LEVEL1_COST, //int cost;
+ LEVEL1_VALUE, //int value;
+ },
+ {
PCL_ALIEN_LEVEL2, //int classnum;
"level2", //char *classname;
"Has a melee attack and the ability to jump off walls. This "
@@ -2986,6 +3017,31 @@ static const weaponAttributes_t bg_weapons[ ] =
TEAM_ALIENS //team_t team;
},
{
+ WP_ALEVEL1, //int weaponNum;
+ 0, //int price;
+ STAGE_GE_1, //int stages
+ SLOT_WEAPON, //int slots;
+ "level1", //char *weaponName;
+ "Claws", //char *humanName;
+ "",
+ 1, //int maxAmmo;
+ 0, //int maxClips;
+ qtrue, //int infiniteAmmo;
+ qfalse, //int usesEnergy;
+ LEVEL1_CLAW_REPEAT, //int repeatRate1;
+ 0, //int repeatRate2;
+ 0, //int repeatRate3;
+ 0, //int reloadTime;
+ LEVEL1_CLAW_K_SCALE, //float knockbackScale;
+ qfalse, //qboolean hasAltMode;
+ qfalse, //qboolean hasThirdMode;
+ qfalse, //qboolean canZoom;
+ 90.0f, //float zoomFov;
+ qfalse, //qboolean purchasable;
+ qfalse, //qboolean longRanged;
+ TEAM_ALIENS //team_t team;
+ },
+ {
WP_ALEVEL2, //int weaponNum;
0, //int price;
STAGE_GE_2, //int stages
diff --git a/src/game/bg_mod.h b/src/game/bg_mod.h
index a34b7f5..1db77dc 100644
--- a/src/game/bg_mod.h
+++ b/src/game/bg_mod.h
@@ -31,6 +31,7 @@ MOD( MOD_TARGET_LASER, CSW_UNKNOWN ),
MOD( MOD_TRIGGER_HURT, CSW_UNKNOWN ),
MOD( MOD_ABUILDER_CLAW, CSW_ABUILDER ),
MOD( MOD_LEVEL0_BITE, CSW_UNKNOWN ),
+MOD( MOD_LEVEL1_CLAW, CSW_LEVEL1 ),
MOD( MOD_LEVEL3_CLAW, CSW_LEVEL3 ),
MOD( MOD_LEVEL3_POUNCE, CSW_UNKNOWN ),
MOD( MOD_LEVEL5_POUNCE, CSW_UNKNOWN ),
diff --git a/src/game/bg_pmove.c b/src/game/bg_pmove.c
index 3b36d9e..8ab7282 100644
--- a/src/game/bg_pmove.c
+++ b/src/game/bg_pmove.c
@@ -3482,6 +3482,15 @@ static void PM_Weapon( void )
// weapon.cfg
switch( pm->ps->weapon )
{
+ case WP_ALEVEL1:
+ if( attack1 )
+ {
+ num /= RAND_MAX / 6 + 1;
+ PM_ForceLegsAnim( NSPA_ATTACK1 );
+ PM_StartWeaponAnim( WANIM_ATTACK1 + num );
+ }
+ break;
+
case WP_ALEVEL2_UPG:
if( attack2 )
{
diff --git a/src/game/bg_public.h b/src/game/bg_public.h
index 6c0e626..8f12356 100644
--- a/src/game/bg_public.h
+++ b/src/game/bg_public.h
@@ -345,6 +345,7 @@ typedef enum
{
WP_NONE,
WP_ALEVEL0,
+ WP_ALEVEL1,
WP_ALEVEL2,
WP_ALEVEL2_UPG,
WP_ALEVEL5,
@@ -793,6 +794,7 @@ typedef enum
PCL_ALIEN_BUILDER0_UPG,
//offensive classes
PCL_ALIEN_LEVEL0,
+ PCL_ALIEN_LEVEL1,
PCL_ALIEN_LEVEL2,
PCL_ALIEN_LEVEL2_UPG,
PCL_ALIEN_LEVEL5,
diff --git a/src/game/g_csw.h b/src/game/g_csw.h
index 49e2088..96158b7 100644
--- a/src/game/g_csw.h
+++ b/src/game/g_csw.h
@@ -17,6 +17,7 @@ CSW( CSW_GRENADE, MOD_GRENADE, "Grenade", GRENADE_DAMAGE ),
CSW( CSW_ABUILDER, MOD_ABUILDER_CLAW, "Granger", ABUILDER_CLAW_DMG ),
CSW( CSW_ABUILDER_ALT, MOD_SLOWBLOB, "Granger Spit", ABUILDER_BLOB_DMG ),
+CSW( CSW_LEVEL1, MOD_LEVEL1_CLAW, "Basilisk", LEVEL1_CLAW_DMG ),
CSW( CSW_LEVEL2, MOD_LEVEL2_CLAW, "Marauder", LEVEL2_CLAW_DMG ),
CSW( CSW_LEVEL2_UPG, MOD_LEVEL2_CLAW_UPG, "Adv. Marauder", LEVEL2_CLAW_UPG_DMG ),
CSW( CSW_LEVEL2_ALT, MOD_LEVEL2_ZAP, "Marauder Zap", LEVEL2_AREAZAP_DMG ),
diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c
index 586af40..90eb069 100644
--- a/src/game/g_weapon.c
+++ b/src/game/g_weapon.c
@@ -1763,6 +1763,10 @@ void FireWeapon( gentity_t *ent )
// fire the specific weapon
switch( ent->s.weapon )
{
+ case WP_ALEVEL1:
+ meleeAttack( ent, LEVEL1_CLAW_RANGE, LEVEL1_CLAW_WIDTH, LEVEL1_CLAW_WIDTH,
+ LEVEL1_CLAW_DMG, MOD_LEVEL1_CLAW );
+ break;
case WP_ALEVEL3:
meleeAttack( ent, LEVEL3_CLAW_RANGE, LEVEL3_CLAW_WIDTH, LEVEL3_CLAW_WIDTH,
LEVEL3_CLAW_DMG, MOD_LEVEL3_CLAW );
diff --git a/src/game/tremulous.h b/src/game/tremulous.h
index 95b6398..f548b58 100644
--- a/src/game/tremulous.h
+++ b/src/game/tremulous.h
@@ -125,12 +125,26 @@ TREMULOUS EDGE MOD SRC FILE
#define LEVEL0_BITE_REPEAT 500
#define LEVEL0_BITE_K_SCALE 1.0f
+//Basilik
+#define LEVEL1_SPEED 1.25f
+#define LEVEL1_VALUE AVM(270)
+#define LEVEL1_HEALTH AHM(60)
+#define LEVEL1_REGEN (0.03f * LEVEL1_HEALTH)
+#define LEVEL1_COST 1
+
+#define LEVEL1_CLAW_DMG ADM(32)
+#define LEVEL1_CLAW_RANGE 64.0f
+#define LEVEL1_CLAW_U_RANGE LEVEL1_CLAW_RANGE + 3.0f
+#define LEVEL1_CLAW_WIDTH 10.0f
+#define LEVEL1_CLAW_REPEAT 600
+#define LEVEL1_CLAW_K_SCALE 1.0f
+
//Marauder
#define LEVEL2_SPEED 1.2f
#define LEVEL2_VALUE AVM(420)
#define LEVEL2_HEALTH AHM(150)
#define LEVEL2_REGEN (0.03f * LEVEL2_HEALTH)
-#define LEVEL2_COST 2
+#define LEVEL2_COST 1
#define LEVEL2_UPG_SPEED 1.2f
#define LEVEL2_UPG_VALUE AVM(540)
#define LEVEL2_UPG_HEALTH AHM(175)