mirror of
https://github.com/unknownworlds/NS.git
synced 2025-03-20 08:20:59 +00:00
Mantis 0000991:
o Structure health is now always visible to maintance players (using welder or having healspray as active weapon) o Small optimization Mantis 0000992: o Ensured all teammate order data got wiped on HUD reset (ClearData()) - Enabled new hitbox code check git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@75 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
5a99dc5bf4
commit
8b8fd61e6c
4 changed files with 30 additions and 17 deletions
|
@ -649,6 +649,9 @@ void AvHHud::ClearData()
|
|||
|
||||
// tankefugl: 0000971
|
||||
this->mTeammateOrder.clear();
|
||||
this->mDisplayOrderIndex = 0;
|
||||
this->mDisplayOrderTime = 0;
|
||||
this->mDisplayOrderType = 0;
|
||||
// :tankefugl
|
||||
}
|
||||
|
||||
|
|
|
@ -159,7 +159,6 @@ extern AvHCommanderModeHandler gCommanderHandler;
|
|||
extern AvHParticleEditorHandler gParticleEditorHandler;
|
||||
float kD3DErrorValue = 0.01f;
|
||||
|
||||
|
||||
vec3_t GetViewOrigin()
|
||||
{
|
||||
vec3_t theOrigin = v_origin;
|
||||
|
@ -2397,8 +2396,11 @@ void AvHHud::DrawBuildHealthEffectsForEntity(int inEntityIndex, float inAlpha)
|
|||
// It's an unfriendly building that's very close OR
|
||||
(!theEntityIsPlayer && (theDistanceToEntity < kDrawEnemyBuildingDistance)) ||
|
||||
|
||||
// It's a friendly entity and we're a builder
|
||||
(theIsOnOurTeam && (this->GetHUDUser3() == AVH_USER3_ALIEN_PLAYER2))
|
||||
// It's a friendly entity and we're a builder OR
|
||||
(theIsOnOurTeam && (this->GetHUDUser3() == AVH_USER3_ALIEN_PLAYER2)) ||
|
||||
|
||||
// welder/healing spray is selected
|
||||
(this->mCurrentWeaponID == 18 || this->mCurrentWeaponID == 27)
|
||||
|
||||
)
|
||||
{
|
||||
|
@ -2521,16 +2523,17 @@ void AvHHud::DrawSelectionAndBuildEffects()
|
|||
// :tankefugl
|
||||
}
|
||||
|
||||
// tankefugl: 0000988
|
||||
gEngfuncs.pEventAPI->EV_SetUpPlayerPrediction( false, true );
|
||||
gEngfuncs.pEventAPI->EV_PushPMStates();
|
||||
gEngfuncs.pEventAPI->EV_SetSolidPlayers(-1);
|
||||
// tankefugl: 0000988 & 0000991
|
||||
bool maintanceWeaponSelected = (this->mCurrentWeaponID == 18 || this->mCurrentWeaponID == 27);
|
||||
bool isCommander = this->GetInTopDownMode();
|
||||
if (isCommander || maintanceWeaponSelected) {
|
||||
gEngfuncs.pEventAPI->EV_SetUpPlayerPrediction( false, true );
|
||||
gEngfuncs.pEventAPI->EV_PushPMStates();
|
||||
gEngfuncs.pEventAPI->EV_SetSolidPlayers(-1);
|
||||
|
||||
if (this->GetInTopDownMode()) {
|
||||
int localPlayerIndex = gEngfuncs.GetLocalPlayer()->index;
|
||||
physent_t *thePlayer = gEngfuncs.pEventAPI->EV_GetPhysent(localPlayerIndex);
|
||||
// gEngfuncs.Con_Printf("gEngfuncs.GetLocalPlayer()->index = %d, thePlayer->team = %d\n", gEngfuncs.GetLocalPlayer()->index, thePlayer->team);
|
||||
|
||||
physent_t *thePlayer = gEngfuncs.pEventAPI->EV_GetPhysent(localPlayerIndex);
|
||||
physent_t* theEntity = NULL;
|
||||
int theNumEnts = pmove->numphysent;
|
||||
for (int i = 0; i < theNumEnts; i++)
|
||||
|
@ -2547,17 +2550,24 @@ void AvHHud::DrawSelectionAndBuildEffects()
|
|||
bool theIsPlayer = ((theEntityIndex >= 1) && (theEntityIndex <= gEngfuncs.GetMaxClients()));
|
||||
bool theSameTeam = (theEntity->team == thePlayer->team );
|
||||
|
||||
if(theIsPlayer || theSameTeam)
|
||||
if (isCommander && (theIsPlayer || theSameTeam))
|
||||
{
|
||||
this->DrawBuildHealthEffectsForEntity(theEntityIndex, 0.3);
|
||||
this->DrawBuildHealthEffectsForEntity(theEntityIndex, 0.2);
|
||||
}
|
||||
else if (maintanceWeaponSelected && theSameTeam && !theIsPlayer)
|
||||
{
|
||||
if (AvHTraceLineAgainstWorld(gEngfuncs.GetLocalPlayer()->origin, theEntity->origin) == 1.0f)
|
||||
{
|
||||
this->DrawBuildHealthEffectsForEntity(theEntityIndex, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
gEngfuncs.pEventAPI->EV_PopPMStates();
|
||||
}
|
||||
gEngfuncs.pEventAPI->EV_PopPMStates();
|
||||
// :tankefugl
|
||||
// :tankefugl
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1364,7 +1364,7 @@ bool AvHPlayer::ExecuteMessage(AvHMessageID inMessageID, bool inInstantaneous, b
|
|||
int theTraced = 0;
|
||||
vec3_t vecFrom, vecTo;
|
||||
|
||||
if (theEntity->GetTeam() == this->GetTeam())
|
||||
if ((theEntity->entindex() != this->entindex()) && (theEntity->GetTeam() == this->GetTeam()))
|
||||
{
|
||||
VectorSubtract(theEntity->pev->origin, this->pev->origin, vecDistance);
|
||||
// theDistance = Length(vecDistance);
|
||||
|
|
|
@ -1224,14 +1224,14 @@ void AvHSUServerTraceBullets(const Vector& inStart, const Vector& inEnd, IGNORE_
|
|||
outProtected = false;
|
||||
|
||||
// This is the old way that doesn't take into account skulk rotation.
|
||||
UTIL_TraceLine(inStart, inEnd, inIgnoreMonsters, /*dont_ignore_glass,*/ inIgnoreEdict, &outTraceResult);
|
||||
// UTIL_TraceLine(inStart, inEnd, inIgnoreMonsters, /*dont_ignore_glass,*/ inIgnoreEdict, &outTraceResult);
|
||||
|
||||
// TEMP removed the skulk hitboxes since it's too risky for the LAN.
|
||||
// joev: 0000573
|
||||
// this was commented out meaning that it was just stock tracelines, not using Max M's superb hitbox collision code.
|
||||
// Now *all* hitboxes perform as expected and the crouched fade can be shot pretty much anywhere on the model
|
||||
// (allowing for about a 5% visual disparity)
|
||||
//AvHTraceLine(inStart, inEnd, inIgnoreMonsters, /*dont_ignore_glass,*/ inIgnoreEdict, &outTraceResult);
|
||||
AvHTraceLine(inStart, inEnd, inIgnoreMonsters, /*dont_ignore_glass,*/ inIgnoreEdict, &outTraceResult);
|
||||
// :joev
|
||||
CBaseEntity* theEntityHit = CBaseEntity::Instance(outTraceResult.pHit);
|
||||
|
||||
|
|
Loading…
Reference in a new issue