....................................menus .......News................................. |
![]() "more bounce per ounce" |
mods.................................... |
I m p l e m e n t a t i o n
Pro-Rocket
1.0
Using
pro-rocket in your mod is simple.
Either download the source files
or do a little copy-pasting from here.
Mod Authors ! Please email-me if you are planning to include pro-rocket in your project !
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
g_combat.c
Around line 400 :
if (!(dflags & DAMAGE_NO_KNOCKBACK))
{
if ((knockback) && (targ->movetype != MOVETYPE_NONE) && (targ->movetype != MOVETYPE_BOUNCE) && (targ->movetype != MOVETYPE_PUSH) && (targ->movetype != MOVETYPE_STOP))
{
vec3_t kvel;
float mass;
if (targ->mass < 50)
mass = 50;
else
mass = targ->mass;
//******************************* MODIFIED for Pro-Rocket - BOUNCE TWEAK
//if (targ->client && attacker == targ)
// VectorScale (dir, 1600.0 * (float)knockback / mass, kvel); // the rocket jump hack...
//else
//VectorScale (dir, 500.0 * (float)knockback / mass, kvel);
if (targ->client && attacker == targ)
VectorScale (dir, 1870.0 * (float)knockback / mass, kvel);
else
VectorScale (dir, 1760.0 * (float)knockback / mass, kvel);
//******************************* MODIFIED for Pro-Rocket - BOUNCE TWEAK
VectorAdd (targ->velocity, kvel, targ->velocity);
}
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
g_local.h
Around line 12 : #define GAME_INCLUDE #include "game.h" //******************************* ADDED for Pro-Rocket - FAST WEAPON SWITCHING - from CRT #define fastswitch 1 //******************************* ADDED for Pro-Rocket - FAST WEAPON SWITCHING - from CRT // the "gameversion" client command will print this plus compile date #define GAMEVERSION "baseq2"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
g_weapon.c
Around line 566 :
void rocket_touch (edict_t *ent, edict_t *other, cplane_t *plane, csurface_t *surf)
{
vec3_t origin;
int n;
if (other == ent->owner)
return;
if (surf && (surf->flags & SURF_SKY))
{
G_FreeEdict (ent);
return;
}
if (ent->owner->client)
PlayerNoise(ent->owner, ent->s.origin, PNOISE_IMPACT);
// calculate position for the explosion entity
VectorMA (ent->s.origin, -0.02, ent->velocity, origin);
if (other->takedamage)
{
//******************************* MODIFIED for Pro-Rocket - ROCKET DIRECT HIT KICK
//T_Damage (other, ent, ent->owner, ent->velocity, ent->s.origin, plane->normal, ent->dmg, 0, 0, MOD_ROCKET);
T_Damage (other, ent, ent->owner, ent->velocity, ent->s.origin, plane->normal, ent->dmg, ent->dmg, 0, MOD_ROCKET);
//******************************* MODIFIED for Pro-Rocket - ROCKET DIRECT HIT KICK
}
else
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
p_client.c
Around line 1125 : // send effect gi.WriteByte (svc_muzzleflash); gi.WriteShort (ent-g_edicts); gi.WriteByte (MZ_LOGIN); gi.multicast (ent->s.origin, MULTICAST_PVS); gi.bprintf (PRINT_HIGH, "%s entered the game\n", ent->client->pers.netname); // *********************** ADDED FOR PRO-ROCKET - PLAYER NOTIFICATION // by no means does the notification have to be here or exactly like this, // as long is the players are notified somewhere that the mod is running pro-rocket ! gi.centerprintf (ent, "This mod is running Pro-Rocket 1.0\nhttp://www.88.com/pro-rocket\n"); // *********************** ADDED FOR PRO-ROCKET - PLAYER NOTIFICATION
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
p_weapon.c
Around line 355 :
if (ent->client->weaponstate == WEAPON_ACTIVATING)
{
//******************************* MODIFIED for Pro-Rocket - FAST WEAPON SWITCHING - from CRT
//if (ent->client->ps.gunframe == FRAME_ACTIVATE_LAST)
if (ent->client->ps.gunframe == FRAME_ACTIVATE_LAST || fastswitch)
//******************************* MODIFIED for Pro-Rocket - FAST WEAPON SWITCHING - from CRT
{
ent->client->weaponstate = WEAPON_READY;
ent->client->ps.gunframe = FRAME_IDLE_FIRST;
return;
}
Around line 371 :
if ((ent->client->newweapon) && (ent->client->weaponstate != WEAPON_FIRING))
{
ent->client->weaponstate = WEAPON_DROPPING;
//******************************* MODIFIED for Pro-Rocket - FAST WEAPON SWITCHING - from CRT
//ent->client->ps.gunframe = FRAME_DEACTIVATE_FIRST;
if (fastswitch)
ent->client->ps.gunframe = FRAME_DEACTIVATE_LAST;
else
ent->client->ps.gunframe = FRAME_DEACTIVATE_FIRST;
//******************************* MODIFIED for Pro-Rocket - FAST WEAPON SWITCHING - from CRT
return;
}
Around line 680 :
void Weapon_RocketLauncher_Fire (edict_t *ent)
{
vec3_t offset, start;
vec3_t forward, right;
int damage;
float damage_radius;
int radius_damage;
//******************************* MODIFIED for Pro-Rocket - ROCKET DAMAGE AND RADIUS TWEAKS //damage = 100 + (int)(random() * 20.0); //radius_damage = 120; //damage_radius = 120; damage = 90 + (int)(random() * 20.0); radius_damage = 110; damage_radius = 160; //******************************* MODIFIED for Pro-Rocket - ROCKET DAMAGE AND RADIUS TWEAKS
if (is_quad)
{
damage *= 4;
radius_damage *= 4;
}
Around line 700 : VectorSet(offset, 8, 8, ent->viewheight-8); P_ProjectSource (ent->client, ent->s.origin, offset, forward, right, start); //******************************* MODIFIED for Pro-Rocket - ROCKET SPEED INCREASE //fire_rocket (ent, start, forward, damage, 650, damage_radius, radius_damage); fire_rocket (ent, start, forward, damage, 1000, damage_radius, radius_damage); //******************************* MODIFIED for Pro-Rocket - ROCKET SPEED INCREASE // send muzzle flash gi.WriteByte (svc_muzzleflash);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
please
incorporate these changes verbatim, otherwise it won't be a
standard.
From now on, all suggestions/tweaks/changes to the Pro-Rocket
specs
will be decided by the people who use and play it.
.