diff options
author | enneract <trem.redman@gmail.com> | 2014-11-19 19:57:31 +0100 |
---|---|---|
committer | enneract <trem.redman@gmail.com> | 2014-11-19 19:57:31 +0100 |
commit | 9e0e1eeeb964f1eaf94622399695e4b4a2d0f1db (patch) | |
tree | a13681a4560d2a9884ca18ec75efc3291cfda50c | |
parent | 2a93a38bfa8feab7e7f9be7332f75f2d2b0036e7 (diff) |
Implement the Rocket Launcher.
29 files changed, 339 insertions, 1 deletions
diff --git a/assets/models/ammo/rocket/rocket.md3 b/assets/models/ammo/rocket/rocket.md3 Binary files differnew file mode 100644 index 0000000..c181114 --- /dev/null +++ b/assets/models/ammo/rocket/rocket.md3 diff --git a/assets/models/ammo/rocket/rocket.tga b/assets/models/ammo/rocket/rocket.tga Binary files differnew file mode 100644 index 0000000..47e4606 --- /dev/null +++ b/assets/models/ammo/rocket/rocket.tga diff --git a/assets/models/ammo/rocket/rocket_1.md3 b/assets/models/ammo/rocket/rocket_1.md3 Binary files differnew file mode 100644 index 0000000..668f3f9 --- /dev/null +++ b/assets/models/ammo/rocket/rocket_1.md3 diff --git a/assets/models/ammo/rocket/rocket_2.md3 b/assets/models/ammo/rocket/rocket_2.md3 Binary files differnew file mode 100644 index 0000000..c2af2a0 --- /dev/null +++ b/assets/models/ammo/rocket/rocket_2.md3 diff --git a/assets/models/ammo/rocket/thrustc1.tga b/assets/models/ammo/rocket/thrustc1.tga Binary files differnew file mode 100644 index 0000000..581b972 --- /dev/null +++ b/assets/models/ammo/rocket/thrustc1.tga diff --git a/assets/models/ammo/rocket/thrustc2.tga b/assets/models/ammo/rocket/thrustc2.tga Binary files differnew file mode 100644 index 0000000..718f95d --- /dev/null +++ b/assets/models/ammo/rocket/thrustc2.tga diff --git a/assets/models/ammo/rocket/thrustc3.tga b/assets/models/ammo/rocket/thrustc3.tga Binary files differnew file mode 100644 index 0000000..ea1cc68 --- /dev/null +++ b/assets/models/ammo/rocket/thrustc3.tga diff --git a/assets/models/weapons/rocketl/copy of rocketl.md3 b/assets/models/weapons/rocketl/copy of rocketl.md3 Binary files differnew file mode 100644 index 0000000..a66b033 --- /dev/null +++ b/assets/models/weapons/rocketl/copy of rocketl.md3 diff --git a/assets/models/weapons/rocketl/flare.tga b/assets/models/weapons/rocketl/flare.tga Binary files differnew file mode 100644 index 0000000..86516ca --- /dev/null +++ b/assets/models/weapons/rocketl/flare.tga diff --git a/assets/models/weapons/rocketl/flarey.tga b/assets/models/weapons/rocketl/flarey.tga Binary files differnew file mode 100644 index 0000000..37f56dc --- /dev/null +++ b/assets/models/weapons/rocketl/flarey.tga diff --git a/assets/models/weapons/rocketl/flash0.wav b/assets/models/weapons/rocketl/flash0.wav Binary files differnew file mode 100644 index 0000000..009febe --- /dev/null +++ b/assets/models/weapons/rocketl/flash0.wav diff --git a/assets/models/weapons/rocketl/impact0.wav b/assets/models/weapons/rocketl/impact0.wav Binary files differnew file mode 100644 index 0000000..f232ff1 --- /dev/null +++ b/assets/models/weapons/rocketl/impact0.wav diff --git a/assets/models/weapons/rocketl/muzzy.tga b/assets/models/weapons/rocketl/muzzy.tga Binary files differnew file mode 100644 index 0000000..a452b3f --- /dev/null +++ b/assets/models/weapons/rocketl/muzzy.tga diff --git a/assets/models/weapons/rocketl/newflare.tga b/assets/models/weapons/rocketl/newflare.tga Binary files differnew file mode 100644 index 0000000..fd6866e --- /dev/null +++ b/assets/models/weapons/rocketl/newflare.tga diff --git a/assets/models/weapons/rocketl/rocketl.md3 b/assets/models/weapons/rocketl/rocketl.md3 Binary files differnew file mode 100644 index 0000000..4119209 --- /dev/null +++ b/assets/models/weapons/rocketl/rocketl.md3 diff --git a/assets/models/weapons/rocketl/rocketl_hand.md3 b/assets/models/weapons/rocketl/rocketl_hand.md3 Binary files differnew file mode 100644 index 0000000..2a03eed --- /dev/null +++ b/assets/models/weapons/rocketl/rocketl_hand.md3 diff --git a/assets/models/weapons/rocketl/skin.tga b/assets/models/weapons/rocketl/skin.tga Binary files differnew file mode 100644 index 0000000..59e1399 --- /dev/null +++ b/assets/models/weapons/rocketl/skin.tga diff --git a/assets/models/weapons/rocketl/weapon.cfg b/assets/models/weapons/rocketl/weapon.cfg new file mode 100644 index 0000000..9711bd9 --- /dev/null +++ b/assets/models/weapons/rocketl/weapon.cfg @@ -0,0 +1,19 @@ +weaponModel models/weapons/rocketl/rocketl.md3 +icon icons/iconw_lucifer +crosshair 48 gfx/2d/crosshair-lcannon_s + +primary +{ + missileModel models/ammo/rocket/rocket.md3 + + missileSound models/weapons/lcannon/missle.wav + missileParticleSystem models/weapons/rocketl/missilePS + + flashDlightColor 1.0 0.7 0.0 + flashSound 0 models/weapons/rocketl/flash0.wav + + impactMark 32 gfx/marks/bullet_mrk + impactSound 0 models/weapons/rocketl/impact0.wav + impactParticleSystem models/weapons/rocketl/impactPS +} + diff --git a/assets/models/weapons/rocketl/wide.tga b/assets/models/weapons/rocketl/wide.tga Binary files differnew file mode 100644 index 0000000..04a59b4 --- /dev/null +++ b/assets/models/weapons/rocketl/wide.tga diff --git a/assets/rocketl-copyright b/assets/rocketl-copyright new file mode 100644 index 0000000..fcb3c04 --- /dev/null +++ b/assets/rocketl-copyright @@ -0,0 +1,11 @@ +Rocket Launcher assets: + +flash0.wav: + http://freesound.org/people/shaynecantly/sounds/131555/ + +impact0.wav: + http://freesound.org/people/sarge4267/sounds/102734/ + http://freesound.org/people/sarge4267/sounds/102719/ + +Models and textures: + http://openarena.ws/ diff --git a/assets/scripts/general_human_buildables.particle b/assets/scripts/general_human_buildables.particle index 52ffb64..8a40717 100644 --- a/assets/scripts/general_human_buildables.particle +++ b/assets/scripts/general_human_buildables.particle @@ -261,4 +261,4 @@ humanBuildableDestroyedPS delay 0 period 0 - ~0% } -}
\ No newline at end of file +} diff --git a/assets/scripts/hw_rocketl.particle b/assets/scripts/hw_rocketl.particle new file mode 100644 index 0000000..891ac18 --- /dev/null +++ b/assets/scripts/hw_rocketl.particle @@ -0,0 +1,135 @@ +models/weapons/rocketl/missilePS +{ + ejector + { + particle + { + shader sync gfx/sprites/smoke + + displacement 0 0 0 ~0 + + velocityType static + velocityDir linear + velocityMagnitude 50 + velocity 0 0 1 ~20 + + accelerationType static + accelerationDir linear + accelerationMagnitude 50 + acceleration 0 0 0 0 + + radius 0 0.0 60.0 + alpha 0 1.0 0.0 + rotation ~360 ~360 - + bounce 0.5 + + lifeTime 700~50% + } + + count infinite + delay 0 + period 20 - ~0% + } +} + +models/weapons/rocketl/impactPS +{ + ejector + { + particle + { + shader sync rocketFlareParticle + displacement 0 0 0 0 + + velocityType normal + + velocityDir linear + + velocityMagnitude 0 + velocity 0 0 0 ~0 + + accelerationType static + accelerationDir linear + acceleration 0 0 0 ~0 + accelerationMagnitude 0 + + radius 0 50 100 + alpha 250 1 0 + rotation 0 ~-15 ~15 + bounce 0.0 + + lifeTime 40 + } + + count 1 + delay 0 + period 0 - 0 + } + + ejector + { + particle + { + shader sync gfx/sprites/smoke + //shader sync flame3 flame4 flame5 flame6 flame7 flame8 flame9 flame10 flame11 flame12 flame13 flame14 flame15 flame16 flame17 flame18 flame19 flame20 flame21 flame22 flame23 flame24 flame25 + displacement 0 0 0 0 + + velocityType normal + + velocityDir linear + + velocityMagnitude 100 + velocity 0 0 0 ~35 + + accelerationType static + accelerationDir linear + acceleration 0 0 -1 ~5 + accelerationMagnitude 25 + + radius 0 0 60 + alpha 250 .75 0 + rotation 0 ~-15 ~15 + bounce 0.0 + + lifeTime 800~200 + } + + count 10 + delay 0 + period 0 - 0 + } + + ejector + { + particle + { + shader sync flame3 flame4 flame5 flame6 flame7 flame8 flame9 flame10 flame11 flame12 flame13 flame14 flame15 flame16 flame17 flame18 flame19 flame20 flame21 flame22 flame23 flame24 flame25 + displacement 0 0 0 0 + + velocityType normal + + velocityDir linear + + velocityMagnitude 100 + velocity 0 0 0 ~35 + + accelerationType static + accelerationDir linear + acceleration 0 0 -1 ~5 + accelerationMagnitude 25 + + radius 0 0 100 + alpha 250 .75 0 + rotation 0 ~-15 ~15 + bounce 0.0 + color 0 { 0.8 0.2 0.2 } - + + lifeTime 300~100 + } + + count 1 + delay 0 + period 0 - 0 + } +} + diff --git a/assets/scripts/hw_rocketl.shader b/assets/scripts/hw_rocketl.shader new file mode 100644 index 0000000..28c56cb --- /dev/null +++ b/assets/scripts/hw_rocketl.shader @@ -0,0 +1,58 @@ +rocketFlash +{ + deformVertexes autosprite + { + clampmap models/weapons/rocketl/muzzy.tga + blendfunc add + tcMod rotate 1246 + } + { + clampmap models/weapons/rocketl/muzzy.tga + blendfunc add + tcMod rotate -1246 + } +} + +rocketFlare +{ + deformVertexes autosprite + { + clampmap models/weapons/rocketl/wide.tga + blendfunc add + rgbGen const ( 0.980392 0.882353 0.737255 ) + } +} + +rocketFlareParticle +{ + { + clampmap models/weapons/rocketl/wide.tga + blendfunc add + rgbGen const ( 0.980392 0.882353 0.737255 ) + } +} + +rocketThrust +{ + cull disable + { + clampmap models/weapons/rocketl/flarey.tga + blendfunc add + rgbGen const ( 0.541176 0.341176 0.156863 ) + tcMod rotate -96 + tcMod stretch sin 0.3 0.7 0 8 + } + { + clampmap models/weapons/rocketl/wide.tga + blendfunc add + rgbGen const ( 0.843137 0.588235 0.4 ) + } + { + clampmap models/weapons/rocketl/newflare.tga + blendfunc add + rgbGen const ( 0.713726 0.270588 0.121569 ) + tcMod rotate 46 + tcMod stretch inversesawtooth 0.6 0.4 0 4 + } +} + diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 2bd3251..794b8a4 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -162,6 +162,16 @@ static void CG_Obituary( entityState_t *ent ) message = "^5irradiated himself"; break; + + case MOD_ROCKETL_SPLASH: + if( gender == GENDER_FEMALE ) + message = "^5blew herself up"; + else if( gender == GENDER_NEUTER ) + message = "^5blew itself up"; + else + message = "^5blew himself up"; + break; + case MOD_PSAWBLADE: if( gender == GENDER_FEMALE ) message = "^5sliced herself up"; @@ -320,6 +330,14 @@ static void CG_Obituary( entityState_t *ent ) message = "^5was caught in the fallout of^7"; message2 = "^5's ^5lucifer cannon"; break; + case MOD_ROCKETL: + message = "^5ate^7"; + message2 = "^5's ^5rocket"; + break; + case MOD_ROCKETL_SPLASH: + message = "^5almost dodged^7"; + message2 = "^5's ^5rocket"; + break; case MOD_GRENADE: message = "^5couldn't escape^7"; message2 = "^5's ^5grenade"; diff --git a/src/game/bg_misc.c b/src/game/bg_misc.c index 3c19b15..92f3826 100644 --- a/src/game/bg_misc.c +++ b/src/game/bg_misc.c @@ -3602,6 +3602,31 @@ static const weaponAttributes_t bg_weapons[ ] = TEAM_HUMANS //team_t team; }, { + WP_ROCKET_LAUNCHER, //int weaponNum; + ROCKETL_PRICE, //int price; + STAGE_GE_5, //int stages + SLOT_WEAPON, //int slots; + "rocketl", //char *weaponName; + "[yefarms]Rocket Launcher", //char *humanName; + "This is a rocket launcher. It launches rockets.", + ROCKETL_AMMO, //int maxAmmo; + ROCKETL_CLIPS, //int maxClips; + qfalse, //int infiniteAmmo; + qfalse, //int usesEnergy; + ROCKETL_REPEAT, //int repeatRate1; + 0, //int repeatRate2; + 0, //int repeatRate3; + ROCKETL_RELOAD, //int reloadTime; + ROCKETL_K_SCALE, //float knockbackScale; + qfalse, //qboolean hasAltMode; + qfalse, //qboolean hasThirdMode; + qfalse, //qboolean canZoom; + 90.0f, //float zoomFov; + qtrue, //qboolean purchasable; + qtrue, //qboolean longRanged; + TEAM_HUMANS //team_t team; + }, + { WP_GRENADE, //int weaponNum; GRENADE_PRICE, //int price; STAGE_GE_3, //int stages diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 3473924..e4f21ac 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -357,6 +357,7 @@ typedef enum WP_FLAMER, WP_PULSE_RIFLE, WP_LUCIFER_CANNON, + WP_ROCKET_LAUNCHER, WP_GRENADE, WP_SMOKE, WP_MINE, @@ -845,6 +846,8 @@ typedef enum MOD_LCANNON_SPLASH, MOD_FLAMER, MOD_FLAMER_SPLASH, + MOD_ROCKETL, + MOD_ROCKETL_SPLASH, MOD_GRENADE, MOD_PSAWBLADE, MOD_MINE, diff --git a/src/game/g_missile.c b/src/game/g_missile.c index 74ee72b..959067e 100644 --- a/src/game/g_missile.c +++ b/src/game/g_missile.c @@ -965,6 +965,47 @@ gentity_t *fire_luciferCannon( gentity_t *self, vec3_t start, vec3_t dir, return bolt; } + +/* +================= +fire_rocket +================= +*/ +gentity_t *fire_rocket( gentity_t *self, vec3_t start, vec3_t dir ) +{ + gentity_t *bolt; + + VectorNormalize (dir); + + bolt = G_Spawn(); + bolt->classname = "rocket"; + bolt->pointAgainstWorld = qtrue; + bolt->nextthink = level.time + 10000; + bolt->think = G_ExplodeMissile; + bolt->s.eType = ET_MISSILE; + bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; + bolt->s.weapon = WP_ROCKET_LAUNCHER; + bolt->s.generic1 = self->s.generic1; //weaponMode + bolt->r.ownerNum = self->s.number; + bolt->parent = self; + bolt->damage = ROCKETL_DAMAGE; + bolt->splashDamage = ROCKETL_DAMAGE / 2; + bolt->splashRadius = ROCKETL_RADIUS; + bolt->methodOfDeath = MOD_ROCKETL; + bolt->splashMethodOfDeath = MOD_ROCKETL_SPLASH; + bolt->clipmask = MASK_SHOT; + bolt->target_ent = NULL; + bolt->r.mins[ 0 ] = bolt->r.mins[ 1 ] = bolt->r.mins[ 2 ] = -ROCKETL_SIZE; + bolt->r.maxs[ 0 ] = bolt->r.maxs[ 1 ] = bolt->r.maxs[ 2 ] = ROCKETL_SIZE; + bolt->s.pos.trType = TR_LINEAR; + bolt->s.pos.trTime = level.time - MISSILE_PRESTEP_TIME; // move a bit on the very first frame + VectorCopy( start, bolt->s.pos.trBase ); + VectorScale( dir, ROCKETL_SPEED, bolt->s.pos.trDelta ); + SnapVector( bolt->s.pos.trDelta ); // save net bandwidth + VectorCopy( start, bolt->r.currentOrigin ); + return bolt; +} + /* ================= launch_grenade diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index 4e08523..5453913 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -831,6 +831,19 @@ void LCChargeFire( gentity_t *ent, qboolean secondary ) /* ====================================================================== + +PULSE RIFLE + +====================================================================== +*/ + +void rocketLauncherFire( gentity_t *ent ) +{ + fire_rocket( ent, muzzle, forward ); +} + +/* +====================================================================== TESLA GENERATOR ====================================================================== */ @@ -1972,6 +1985,9 @@ void FireWeapon( gentity_t *ent ) case WP_PAIN_SAW: painSawFire( ent ); break; + case WP_ROCKET_LAUNCHER: + rocketLauncherFire( ent ); + break; case WP_GRENADE: throwGrenade( ent ); break; diff --git a/src/game/tremulous.h b/src/game/tremulous.h index 44450f2..bad35e6 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -538,6 +538,18 @@ TREMULOUS EDGE MOD SRC FILE #define FLAMER_CHARGE_AMMO 50 // ammo cost of a full charge shot #define FLAMER_SECONDARY_REPEAT 200 +#define ROCKETL_PRICE 800 +#define ROCKETL_AMMO 20 +#define ROCKETL_CLIPS 0 +#define ROCKETL_RELOAD 0 +#define ROCKETL_REPEAT 800 +#define ROCKETL_K_SCALE 5235251.0f +#define ROCKETL_DAMAGE HDM(100) +#define ROCKETL_RADIUS 120 +#define ROCKETL_SIZE 5 +#define ROCKETL_SPEED 900 + + #define HBUILD_PRICE 0 #define HBUILD_REPEAT 1000 #define HBUILD_HEALRATE 18 |