Code: Select all
BG_EvaluateTrajectory( &ent->s.pos, level.time, origin );
if ( ent->target_ent ) {
passent = ent->target_ent->s.number;
}
else if (ent->count)
{
passent = ENTITYNUM_NONE;
}
else {
passent = ent->r.ownerNum;
}
trap_Trace( &tr, ent->r.currentOrigin, ent->r.mins, ent->r.maxs, origin, passent, ent->clipmask | CONTENTS_TRIGGER);
if ( tr.entityNum != ENTITYNUM_NONE )
{
traceEnt = &g_entities[ tr.entityNum ];
if((strcmp(ent->classname, "hook")) && (strcmp(ent->classname, "althook")))
if(g_telemissiles.integer)
if ( traceEnt && traceEnt->s.eType == ET_TELEPORT_TRIGGER ) {
trigger_teleporter_touch ( traceEnt, ent, &tr );
return;
}
if((strcmp(ent->classname, "hook")) && (strcmp(ent->classname, "althook")))
if(g_bouncepadmissiles.integer)
if ( traceEnt && traceEnt->s.eType == ET_PUSH_TRIGGER ) {
trigger_push_touch ( traceEnt, ent, &tr );
return;
}
}
if ( tr.startsolid || tr.allsolid ) {
trap_Trace( &tr, ent->r.currentOrigin, ent->r.mins, ent->r.maxs, ent->r.currentOrigin, passent, ent->clipmask );
tr.fraction = 0;
}
else {
VectorCopy( tr.endpos, ent->r.currentOrigin );
}
trap_LinkEntity( ent );
if ( tr.fraction != 1 ) {
if ( tr.surfaceFlags & SURF_NOIMPACT ) {
if (ent->parent && ent->parent->client && ent->parent->client->hook == ent) {
ent->parent->client->hook = NULL;
}
G_FreeEntity( ent );
return;
}
G_MissileImpact( ent, &tr );
if ( ent->s.eType != ET_MISSILE ) {
return;
}
}
if (!ent->count) {
trap_Trace( &tr, ent->r.currentOrigin, ent->r.mins, ent->r.maxs, ent->r.currentOrigin, ENTITYNUM_NONE, ent->clipmask );
if (!tr.startsolid || tr.entityNum != ent->r.ownerNum) {
ent->count = 1;
}
}
if(trap_PointContents (origin , -1) & MASK_WATER)
{
if(ent->s.weapon == WP_PLASMAGUN)
{
G_ExplodeMissile(ent);
return;
}
}
G_RunThink( ent );
Code: Select all
bolt->health = rocket.health;
bolt->takedamage = qtrue;
bolt->die = G_MissileDie;
bolt->r.contents = CONTENTS_SHOOTABLE;
VectorSet(bolt->r.mins, -10, -3, 0);
VectorCopy(bolt->r.mins, bolt->r.absmin);
VectorSet(bolt->r.maxs, 10, 3, 6);
VectorCopy(bolt->r.maxs, bolt->r.absmax);