View Single Post
Old 12-19-2004, 01:15 PM   #31
GangsterAngel
Rookie
 
GangsterAngel's Avatar
 
Join Date: May 2004
Posts: 139
not sure if this is a 'bug' ,
but vehicles do not open shields,

FIX:
Code:
void ShieldTouch(gentity_t *self, gentity_t *other, trace_t *trace)
{

	gentity_t *owner;
	owner=self->parent;
		
	//Vehicle open shield's too! - GA
	if(other->s.NPC_class == CLASS_VEHICLE) {
if(other->m_pVehicle->GA_LastRider==NULL)return;
else {
other = other->m_pVehicle->GA_LastRider;
if(!other->inuse || !other->client)return;
}
	}

	if (g_gametype.integer >= GT_TEAM)
	{ // let teammates through
		// compare the parent's team to the "other's" team
		if (self->parent && ( self->parent->client) && (other->client))
		{
			if (OnSameTeam(self->parent, other))
			{
				ShieldGoNotSolid(self);
			}
		}
	}
	else
	{//let the person who dropped the shield through
		if (self->parent && self->parent->s.number == other->s.number)
		{
			ShieldGoNotSolid(self);
		}
		else if(InSameGang(owner,other)) ShieldGoNotSolid(self);
		else if(self->genericValue13!=0 && self->genericValue13 <= other->client->pers.ShieldRank)ShieldGoNotSolid(self);//Rank based shiels
	}
//NPC's who leader owns the shield

if (other && other->inuse && other->s.eType==ET_NPC){
//if(other->client->leader==owner)ShieldGoNotSolid(self);
///Not going to use the above way ,, just going to call ShieldTouch on the owner
ShieldTouch(self,other->client->leader,NULL);

	}
}
GangsterAngel is offline   you may: quote & reply,