if (asProjNaybors[i].psObj->player != psObj->player &&
(asProjNaybors[i].psObj->type == OBJ_DROID ||
asProjNaybors[i].psObj->type == OBJ_STRUCTURE ||
asProjNaybors[i].psObj->type == OBJ_BULLET ||
asProjNaybors[i].psObj->type == OBJ_FEATURE) &&
Can't this be put down into classes? ( psObj->class )
Or mark all attackable OBJ_... via bitmask? ( psObj->type & CLS_ATTACKABLE )
Or add a attackable option to the object? ( psObj->attackable )
asProjNaybors[i].psObj->visible[psObj->player] &&
!aiCheckAlliances(asProjNaybors[i].psObj->player,psObj->player))
{
psTempObj = asProjNaybors[i].psObj;
//Watermelon;so a projectile wont collide with another
projectile unless
it's a counter-missile weapon
if ( psTempObj->type == OBJ_BULLET )
{
if ( !bMissile || (((PROJ_OBJECT
*)psTempObj)->psWStats->weaponSubClass !=
WSC_COUNTER) )
{
continue;
}
}
//Watermelon:dont apply the 'hitbox' bonus if the
target is a building
if ( psTempObj->type == OBJ_STRUCTURE ||
psTempObj->type == OBJ_FEATURE)
{
//Watermelon:ignore oil resource and pickup
if ( psTempObj->type == OBJ_FEATURE )
{
if ( ((FEATURE
*)psTempObj)->psStats->damageable == 0)
Why check this inside the OBJ_STRUCTURE part? Shouldn't it be an extra part?
Also: Why don't check for psObj->damageable directly?
{
continue;
}
}
wpRadius = 1;
Won't this break?
When a projectile flies next to a building it's radius is always reduced to 1
it seems to me...
//Watermelon:AA weapon shouldnt hit buildings
if ( psObj->psWStats->surfaceToAir ==
SHOOT_IN_AIR )
{
continue;
}
}
pgpZQuIlWraoZ.pgp
Description: PGP signature
_______________________________________________ Warzone-dev mailing list [email protected] https://mail.gna.org/listinfo/warzone-dev
