Esempio n. 1
0
CProjectile::CProjectile(const float3& pos, const float3& speed, CUnit* owner, bool isSynced, bool isWeapon, bool isPiece):
	CExpGenSpawnable(pos),
	synced(isSynced),
	weapon(isWeapon),
	piece(isPiece),
	luaMoveCtrl(false),
	checkCol(true),
	deleteMe(false),
	castShadow(false),
	collisionFlags(0),
	speed(speed),
	mygravity(mapInfo? mapInfo->map.gravity: 0.0f),
	ownerId(0)
{
	if (owner) {
		ownerId = owner->id;
	}
	if (!(isWeapon || isPiece)) {
		//! we need to be able to dynacast to derived
		//! types, but this throws away too much RTTI
		ph->AddProjectile(this);
	}

	SetRadius(1.7f);

	GML_GET_TICKS(lastProjUpdate);
}
Esempio n. 2
0
CProjectile::CProjectile():
    checkCol(true),
    deleteMe(false),
    castShadow(false),
    collisionFlags(0),
    s3domodel(0),
    ownerId(0)
{
    GML_GET_TICKS(lastProjUpdate);
}
Esempio n. 3
0
CProjectile::CProjectile():
	synced(false),
	weapon(false),
	piece(false),
	luaMoveCtrl(false),
	checkCol(true),
	deleteMe(false),
	castShadow(false),
	collisionFlags(0),
	speed(ZeroVector),
	mygravity(mapInfo? mapInfo->map.gravity: 0.0f),
	ownerId(0)
{
	GML_GET_TICKS(lastProjUpdate);
}