Example #1
0
qboolean
gunner_blocked(edict_t *self, float dist)
{
	if (!self)
	{
		return false;
	}

	if (blocked_checkshot(self, 0.25 + (0.05 * skill->value)))
	{
		return true;
	}

	if (blocked_checkplat(self, dist))
	{
		return true;
	}

	if (blocked_checkjump(self, dist, 192, 40))
	{
		gunner_jump(self);
		return true;
	}

	return false;
}
Example #2
0
qboolean stalker_blocked (edict_t *self, float dist)
{
	qboolean	onCeiling;

	if(!has_valid_enemy(self))
		return false;

	onCeiling = false;
	if(self->gravityVector[2] > 0)
		onCeiling = true;

	if(!onCeiling)
	{
		if(blocked_checkshot(self, 0.25 + (0.05 * skill->value) ))
		{
			return true;
		}

		if(visible (self, self->enemy))
		{
			stalker_do_pounce(self, self->enemy->s.origin);
			return true;
		}

		if(blocked_checkjump (self, dist, 256, 68))
		{
			stalker_jump (self);
			return true;
		}

		if(blocked_checkplat (self, dist))
			return true;
	}
	else
	{
		if(blocked_checkshot(self, 0.25 + (0.05 * skill->value) ))
		{
			return true;
		}	
		else if(stalker_ok_to_transition(self))
		{
			self->gravityVector[2] = -1;
			self->s.angles[2] += 180.0;
			if(self->s.angles[2] > 360.0)
				self->s.angles[2] -= 360.0;
			self->groundentity = NULL;
			
			return true;
		}
	}

	return false;
}
Example #3
0
qboolean berserk_blocked (edict_t *self, float dist)
{
	if(blocked_checkjump (self, dist, 256, 40))
	{
		berserk_jump(self);
		return true;
	}

	if(blocked_checkplat (self, dist))
		return true;

	return false;
}
Example #4
0
/*
===
Blocked
===
*/
qboolean parasite_blocked (edict_t *self, float dist)
{
	if(blocked_checkshot (self, 0.25 + (0.05 * skill->value) ))
		return true;

	if(blocked_checkjump (self, dist, 256, 68))
	{
		parasite_jump (self);
		return true;
	}

	if(blocked_checkplat (self, dist))
		return true;

	return false;	// Knightmare- warning fix
}
Example #5
0
qboolean infantry_blocked (edict_t *self, float dist)
{
	if(blocked_checkshot (self, 0.25 + (0.05 * skill->value) ))
		return true;

	if(blocked_checkjump (self, dist, 192, 40))
	{
		infantry_jump(self);
		return true;
	}

	if(blocked_checkplat (self, dist))
		return true;

	return false;
}
Example #6
0
qboolean stalker_blocked (edict_t *self, float dist)
{
	qboolean	onCeiling;

//	gi.dprintf("stalker_blocked\n");
	if(!has_valid_enemy(self))
		return false;

	onCeiling = false;
	if(self->gravityVector[2] > 0)
		onCeiling = true;

	if(!onCeiling)
	{
		if(blocked_checkshot(self, 0.25 + (0.05 * skill->value) ))
		{
//			gi.dprintf("blocked: shooting\n");
			return true;
		}

		if(visible (self, self->enemy))
		{
//			gi.dprintf("blocked: jumping at player!\n");
			stalker_do_pounce(self, self->enemy->s.origin);
			return true;
		}

		if(blocked_checkjump (self, dist, 256, 68))
		{
//			gi.dprintf("blocked: jumping up/down\n");
			stalker_jump (self);
			return true;
		}

		if(blocked_checkplat (self, dist))
			return true;
	}
	else
	{
		if(blocked_checkshot(self, 0.25 + (0.05 * skill->value) ))
		{
//			gi.dprintf("blocked: shooting\n");
			return true;
		}	
		else if(stalker_ok_to_transition(self))
		{
			self->gravityVector[2] = -1;
			self->s.angles[2] += 180.0;
			if(self->s.angles[2] > 360.0)
				self->s.angles[2] -= 360.0;
			self->groundentity = NULL;
			
//			gi.dprintf("falling off ceiling\n");
			return true;
		}
//		else
//			gi.dprintf("Not OK to fall!\n");
	}

	return false;
}