Remove autoaim

This commit is contained in:
Simon 2020-08-14 19:20:43 +01:00
parent 3e756e826e
commit 938070f31f
6 changed files with 3 additions and 59 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.drbeef.rtcwquest"
android:versionCode="33"
android:versionName="0.26.0" android:installLocation="auto" >
android:versionCode="34"
android:versionName="0.27.0" android:installLocation="auto" >
<!-- Tell the system this app requires OpenGL ES 3.1. -->
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>

View file

@ -930,21 +930,6 @@ void G_Damage( gentity_t *targ, gentity_t *inflictor, gentity_t *attacker,
}
}
//If player shoots target
if (attacker && !(attacker->r.svFlags& SVF_CASTAI) && (targ->r.svFlags & SVF_CASTAI))
{
if (targ->health > 0) //if target is already dead then ignore
{
LOGI("Got autoaim target");
g_autoAimEntity = targ;
}
else
{
LOGI("Target dead");
g_autoAimEntity = NULL;
}
}
if ( ( g_gametype.integer == GT_SINGLE_PLAYER ) && !( targ->r.svFlags & SVF_CASTAI ) ) { // the player
switch ( mod )
{

View file

@ -1079,10 +1079,6 @@ extern level_locals_t level;
extern gentity_t g_entities[MAX_GENTITIES];
extern gentity_t *g_camEnt;
extern gentity_t *g_autoAimEntity; //Added by Emile Belanger, trying to do proper autoaim
extern unsigned int g_autoAimLastHitTime;
#define FOFS( x ) ( (int)&( ( (gentity_t *)0 )->x ) )
extern vmCvar_t g_gametype;

View file

@ -50,9 +50,6 @@ gclient_t g_clients[MAX_CLIENTS];
gentity_t *g_camEnt = NULL; //----(SA) script camera
vr_client_info_t* gVR;
gentity_t *g_autoAimEntity; //Added by Emile Belanger, trying to do proper autoaim
unsigned int g_autoAimLastHitTime;
// Rafael gameskill
extern int bg_pmove_gameskill_integer;
// done

View file

@ -976,40 +976,6 @@ void Bullet_Fire( gentity_t *ent, float spread, int damage ) {
}
}
//If we have an autoaim target and player shooting..
if (g_autoAimEntity && !(ent->r.svFlags& SVF_CASTAI))
{
//Do a trace to see what the current aim will hit
trace_t tr;
trap_Trace( &tr, muzzleTrace, NULL, NULL, end, ent->s.number, MASK_SHOT );
gentity_t *traceEnt = &g_entities[ tr.entityNum ];
//Now check if thing going to hit is NOT an enemy, if not, move the muzzle to the autoaim enemy
//We do this so if we are good aim anyway the autoaim wont kick in
if (!(traceEnt->r.svFlags& SVF_CASTAI))
{
VectorCopy( g_autoAimEntity->r.currentOrigin, end );
/*
//Draw box arond current target
if (g_autoAimEntity)
{
gentity_t *bboxEnt;
vec3_t b1, b2;
VectorCopy( g_autoAimEntity->r.currentOrigin, b1 );
VectorCopy( g_autoAimEntity->r.currentOrigin, b2 );
VectorAdd( b1, g_autoAimEntity->r.mins, b1 );
VectorAdd( b2, g_autoAimEntity->r.maxs, b2 );
bboxEnt = G_TempEntity( b1, EV_RAILTRAIL );
VectorCopy( b2, bboxEnt->s.origin2 );
bboxEnt->s.dmgFlags = 1; // ("type")
}
*/
}
//reset this, will get set again if sucessful shot
g_autoAimEntity = NULL;
}
Bullet_Fire_Extended( ent, ent, muzzleTrace, end, spread, damage, 0 );
}

View file

@ -42,7 +42,7 @@ If you have questions concerning this license or the applicable additional terms
// q_shared.h -- included first by ALL program modules.
// A user mod should never modify this file
#define Q3_VERSION "RTCWQuest 0.26.0 (Wolf 1.41)"
#define Q3_VERSION "RTCWQuest 0.27.0 (Wolf 1.41)"
// ver 1.0.0 - release
// ver 1.0.1 - post-release work
// ver 1.1.0 - patch 1 (12/12/01)