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,62 @@
// ======================================================================
//
// VisibleObjectNotification.cpp
// copyright (c) 2004 Sony Online Entertainment
//
// ======================================================================
#include "serverGame/FirstServerGame.h"
#include "serverGame/VisibleObjectNotification.h"
#include "serverGame/ServerObject.h"
#include "serverGame/SpaceVisibilityManager.h"
// ======================================================================
VisibleObjectNotification VisibleObjectNotification::ms_instance;
// ======================================================================
VisibleObjectNotification::VisibleObjectNotification() :
ObjectNotification()
{
}
// ----------------------------------------------------------------------
VisibleObjectNotification::~VisibleObjectNotification ()
{
}
// ----------------------------------------------------------------------
bool VisibleObjectNotification::positionAndRotationChanged(Object &object, bool /* dueToParentChange */, const Vector & /* oldPosition */) const
{
ServerObject *asServerObject = object.asServerObject();
NOT_NULL(asServerObject);
SpaceVisibilityManager::moveObject(*asServerObject);
return true;
}
// ----------------------------------------------------------------------
void VisibleObjectNotification::removeFromWorld(Object &object) const
{
ServerObject *asServerObject = object.asServerObject();
NOT_NULL(asServerObject);
SpaceVisibilityManager::removeObject(*asServerObject);
}
// ----------------------------------------------------------------------
void VisibleObjectNotification::cellChanged(Object &object, bool /* dueToParentChange */) const
{
if (!object.isInWorldCell())
{
ServerObject *asServerObject = object.asServerObject();
NOT_NULL(asServerObject);
SpaceVisibilityManager::removeObject(*asServerObject);
}
}
// ======================================================================