mirror of
https://github.com/nzp-team/quakec.git
synced 2025-01-31 13:40:52 +00:00
SERVER: Remove isFacing experiement
This commit is contained in:
parent
578fa2d44e
commit
dfa9313eb9
2 changed files with 2 additions and 23 deletions
|
@ -546,27 +546,6 @@ void(string modelname) Precache_Set = // Precache model, and set myself to it
|
||||||
setmodel(self, modelname);
|
setmodel(self, modelname);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
float(entity who, entity target) isFacing =
|
|
||||||
{
|
|
||||||
float who_angle = who.angles_y;
|
|
||||||
float target_angle = target.angles_y;
|
|
||||||
|
|
||||||
float difference_angle = target_angle - who_angle;
|
|
||||||
|
|
||||||
#ifndef FTE
|
|
||||||
if (difference_angle < -45) {
|
|
||||||
difference_angle += 360;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 180 = directly facing each other, 30 degree buffer.
|
|
||||||
if (difference_angle <= 210 && difference_angle >= 150)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
float() crandom =
|
float() crandom =
|
||||||
{
|
{
|
||||||
return 2*(random() - 0.5);
|
return 2*(random() - 0.5);
|
||||||
|
|
|
@ -402,7 +402,7 @@ void() ReviveGoAway =
|
||||||
//
|
//
|
||||||
void() touch_perk =
|
void() touch_perk =
|
||||||
{
|
{
|
||||||
if (other.classname != "player" || other.downed || other.isBuying == true || !isFacing(other, self))
|
if (other.classname != "player" || other.downed || other.isBuying == true)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// If we're proned and the map permits, collect some spare change
|
// If we're proned and the map permits, collect some spare change
|
||||||
|
@ -1904,7 +1904,7 @@ void PapUpgrade(entity pap, entity buyer) {
|
||||||
|
|
||||||
void touch_pap() {
|
void touch_pap() {
|
||||||
|
|
||||||
if (other.classname != "player" || other.downed || !isFacing(other, self)) {
|
if (other.classname != "player" || other.downed ||) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue