Added serverGame library

This commit is contained in:
Anonymous
2014-01-15 03:59:18 -07:00
parent 89291fb38c
commit 0196cf51d0
1032 changed files with 256379 additions and 0 deletions
@@ -0,0 +1,53 @@
// ======================================================================
//
// ServerCollisionProperty.cpp
//
// Copyright 2001 Sony Online Entertainment
//
// ======================================================================
#include "serverGame/FirstServerGame.h"
#include "serverGame/ServerCollisionProperty.h"
#include "serverGame/CreatureObject.h"
// ======================================================================
ServerCollisionProperty::ServerCollisionProperty(ServerObject &owner) :
CollisionProperty(owner)
{
}
// ----------------------------------------------------------------------
ServerCollisionProperty::ServerCollisionProperty(ServerObject &owner, SharedObjectTemplate const *objTemplate) :
CollisionProperty(owner, objTemplate)
{
}
// ----------------------------------------------------------------------
bool ServerCollisionProperty::canCollideWith (CollisionProperty const *otherCollision) const
{
if (!otherCollision)
return false;
if (isMobile() && otherCollision->isMobile())
{
ServerObject const * const ownerServerObject = getOwner().asServerObject();
ServerObject const * const otherOwnerServerObject = otherCollision->getOwner().asServerObject();
CreatureObject const * const ownerA = (ownerServerObject != 0) ? ownerServerObject->asCreatureObject() : 0;
CreatureObject const * const ownerB = (otherOwnerServerObject != 0) ? otherOwnerServerObject->asCreatureObject() : 0;
if (ownerA && (ownerA->isDead() || ownerA->isIncapacitated()))
return false;
if (ownerB && (ownerB->isDead() || ownerB->isIncapacitated()))
return false;
}
return CollisionProperty::canCollideWith(otherCollision);
}
// ======================================================================