finished the alt fire for railgun (telefrag gun)

This commit is contained in:
q3rally 2021-05-11 11:02:37 +00:00
parent 7b2731e2f6
commit 521d68adc2
6 changed files with 31 additions and 41 deletions

View file

@ -693,6 +693,7 @@ void CalcMuzzlePoint ( gentity_t *ent, vec3_t forward, vec3_t right, vec3_t up,
void SnapVectorTowards( vec3_t v, vec3_t to ); void SnapVectorTowards( vec3_t v, vec3_t to );
qboolean CheckGauntletAttack( gentity_t *ent ); qboolean CheckGauntletAttack( gentity_t *ent );
void TelefragPlayer( gentity_t *player, vec3_t origin ); void TelefragPlayer( gentity_t *player, vec3_t origin );
void TelefragPlayer_P( gentity_t *player, vec3_t origin );
void weapon_telefrag_fire (gentity_t *ent, vec3_t muzzle, vec3_t forward, vec3_t right, vec3_t up); void weapon_telefrag_fire (gentity_t *ent, vec3_t muzzle, vec3_t forward, vec3_t right, vec3_t up);

View file

@ -138,7 +138,7 @@ void TeleportPlayer( gentity_t *player, vec3_t origin, vec3_t angles ) {
// TelefragPlayer // TelefragPlayer
//================================================== //==================================================
void TelefragPlayer( gentity_t *player, vec3_t origin ) { // removed angles void TelefragPlayer_P( gentity_t *player, vec3_t origin ) { // removed angles
gentity_t *tent; gentity_t *tent;
// use temp events at source and destination to prevent the effect // use temp events at source and destination to prevent the effect

View file

@ -30,7 +30,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
G_HomingMissile G_HomingMissile
================ ================
*/ */
void G_HomingMissile( gentity_t *ent )
#define ROCKET_SPEED 600
void rocket_think( gentity_t *ent )
{ {
gentity_t *target = NULL; gentity_t *target = NULL;
gentity_t *rad = NULL; gentity_t *rad = NULL;
@ -46,7 +49,7 @@ void G_HomingMissile( gentity_t *ent )
continue; continue;
if (rad->client->sess.sessionTeam == TEAM_SPECTATOR) if (rad->client->sess.sessionTeam == TEAM_SPECTATOR)
continue; continue;
if ( (g_gametype.integer == GT_TEAM || g_gametype.integer == GT_CTF) && rad->client->sess.sessionTeam == rad->parent->client->sess.sessionTeam) if ( (g_gametype.integer == GT_TEAM || g_gametype.integer == GT_CTF || g_gametype.integer == GT_DOMINATION ) && rad->client->sess.sessionTeam == rad->parent->client->sess.sessionTeam)
continue; continue;
if (!visible (ent, rad)) if (!visible (ent, rad))
continue; continue;
@ -77,6 +80,7 @@ void G_HomingMissile( gentity_t *ent )
ent->nextthink = level.time + 100; ent->nextthink = level.time + 100;
} }
/* /*
================= =================
Missile_Smooth_H Missile_Smooth_H
@ -1093,8 +1097,8 @@ gentity_t *fire_homing_rocket (gentity_t *self, vec3_t start, vec3_t dir) {
bolt = G_Spawn(); bolt = G_Spawn();
bolt->classname = "rocket"; bolt->classname = "rocket";
bolt->nextthink = level.time + 60; bolt->nextthink = level.time + 1;
bolt->think = G_HomingMissile; bolt->think = rocket_think;
bolt->s.eType = ET_MISSILE; bolt->s.eType = ET_MISSILE;
bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN; bolt->r.svFlags = SVF_USE_CURRENT_ORIGIN;
bolt->s.weapon = WP_ROCKET_LAUNCHER; bolt->s.weapon = WP_ROCKET_LAUNCHER;
@ -1114,7 +1118,7 @@ gentity_t *fire_homing_rocket (gentity_t *self, vec3_t start, vec3_t dir) {
VectorCopy( start, bolt->s.pos.trBase ); VectorCopy( start, bolt->s.pos.trBase );
// STONELANCE // STONELANCE
// VectorScale( dir, 900, bolt->s.pos.trDelta ); // VectorScale( dir, 900, bolt->s.pos.trDelta );
VectorScale( dir, 500, bolt->s.pos.trDelta ); VectorScale( dir, ROCKET_SPEED, bolt->s.pos.trDelta );
// END // END
SnapVector( bolt->s.pos.trDelta ); // save net bandwidth SnapVector( bolt->s.pos.trDelta ); // save net bandwidth
VectorCopy (start, bolt->r.currentOrigin); VectorCopy (start, bolt->r.currentOrigin);

View file

@ -733,7 +733,7 @@ TELEFRAG GUN - Altfire to Railgun
====================================================================== ======================================================================
*/ */
/*
void TelefragPlayer( gentity_t *player, vec3_t origin ) { void TelefragPlayer( gentity_t *player, vec3_t origin ) {
gentity_t *tent; gentity_t *tent;
@ -771,7 +771,7 @@ void TelefragPlayer( gentity_t *player, vec3_t origin ) {
trap_LinkEntity (player); trap_LinkEntity (player);
} }
} }
*/
void weapon_telefrag_fire (gentity_t *ent,vec3_t muzzle,vec3_t forward,vec3_t right,vec3_t up) { void weapon_telefrag_fire (gentity_t *ent,vec3_t muzzle,vec3_t forward,vec3_t right,vec3_t up) {

View file

@ -67,7 +67,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define BASETA "missionpack" #define BASETA "missionpack"
#ifndef PRODUCT_VERSION #ifndef PRODUCT_VERSION
#define PRODUCT_VERSION "v0.0.3.0_r396" #define PRODUCT_VERSION "v0.0.3.0_r399"
#endif #endif

View file

@ -5,6 +5,7 @@ Compilator.CompileOnBackground=0
Compilator.ProgSaveAll=0 Compilator.ProgSaveAll=0
Compilator.ProgRunSelection=0 Compilator.ProgRunSelection=0
Compilator.LogType=0 Compilator.LogType=0
Compilator.LogEncoding=0
DefaultDir=D:\q3rallysa\engine DefaultDir=D:\q3rallysa\engine
DefaultCP=0 DefaultCP=0
LogtoEnd=1 LogtoEnd=1
@ -165,7 +166,7 @@ q3rallycode
engine\code\client\snd_openal.c engine\code\client\snd_openal.c
engine\code\client\snd_public.h engine\code\client\snd_public.h
engine\code\client\snd_wavelet.c engine\code\client\snd_wavelet.c
-game +game
engine\code\game\ai_chat.c engine\code\game\ai_chat.c
engine\code\game\ai_chat.h engine\code\game\ai_chat.h
engine\code\game\ai_cmd.c engine\code\game\ai_cmd.c
@ -427,7 +428,7 @@ q3rallycode
engine\code\null\null_main.c engine\code\null\null_main.c
engine\code\null\null_net.c engine\code\null\null_net.c
engine\code\null\null_snddma.c engine\code\null\null_snddma.c
+q3_ui -q3_ui
engine\code\q3_ui\ui.def engine\code\q3_ui\ui.def
engine\code\q3_ui\ui_addbots.c engine\code\q3_ui\ui_addbots.c
engine\code\q3_ui\ui_atoms.c engine\code\q3_ui\ui_atoms.c
@ -859,37 +860,21 @@ q3rallycode
engine\cross-make-mingw64.sh engine\cross-make-mingw64.sh
[Open project files] [Open project files]
0=engine\code\qcommon\q_shared.h 0=engine\code\qcommon\q_shared.h
1=engine\code\q3_ui\ui_rally_controls.c 1=engine\code\game\g_misc.c
2=engine\code\cgame\cg_weapons.c 2=engine\code\game\g_weapon.c
3=engine\code\q3_ui\ui_menu.c 3=engine\code\game\g_local.h
4=engine\code\q3_ui\ui_cinematics.c
5=engine\code\q3_ui\ui_loadconfig.c
6=engine\code\cgame\cg_consolecmds.c
7=engine\code\game\g_cmds.c
[Selected Project Files] [Selected Project Files]
Main= Main=
Selected=engine\code\qcommon\q_shared.h Selected=engine\code\game\g_misc.c
[engine\code\qcommon\q_shared.h] [engine\code\qcommon\q_shared.h]
TopLine=55 TopLine=57
Caret=39,70 Caret=39,70
[engine\code\q3_ui\ui_rally_controls.c] [engine\code\game\g_misc.c]
TopLine=1266 TopLine=128
Caret=1,1277 Caret=22,141
[engine\code\cgame\cg_weapons.c] [engine\code\game\g_weapon.c]
TopLine=1264 TopLine=736
Caret=1,1279 Caret=1,737
[engine\code\q3_ui\ui_menu.c] [engine\code\game\g_local.h]
TopLine=524 TopLine=674
Caret=45,533 Caret=22,696
[engine\code\q3_ui\ui_cinematics.c]
TopLine=126
Caret=1,141
[engine\code\q3_ui\ui_loadconfig.c]
TopLine=85
Caret=1,85
[engine\code\cgame\cg_consolecmds.c]
TopLine=590
Caret=1,590
[engine\code\game\g_cmds.c]
TopLine=2195
Caret=1,2208