mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 02:04:04 +00:00
breakout the component types into a scoped enum (#1002)
* breakout the component types into a scoped enum tested that things are the same as they were before * fix missed rename * fix brick-by-brick name to be crafting because that's what it is
This commit is contained in:
@@ -5,10 +5,11 @@
|
||||
#include "EntityManager.h"
|
||||
#include "AgMonumentLaserServer.h"
|
||||
#include "EntityManager.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
|
||||
void AgLaserSensorServer::OnStartup(Entity* self) {
|
||||
|
||||
PhantomPhysicsComponent* physComp = static_cast<PhantomPhysicsComponent*>(self->GetComponent(COMPONENT_TYPE_PHANTOM_PHYSICS));
|
||||
PhantomPhysicsComponent* physComp = static_cast<PhantomPhysicsComponent*>(self->GetComponent(eReplicaComponentType::PHANTOM_PHYSICS));
|
||||
physComp->SetPhysicsEffectActive(true);
|
||||
physComp->SetEffectType(2); // repulse (prolly should make definitions of these are in Entity.cpp)
|
||||
physComp->SetDirectionalMultiplier(static_cast<float>(m_RepelForce));
|
||||
@@ -25,7 +26,7 @@ void AgLaserSensorServer::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
|
||||
Entity* laser = nullptr;
|
||||
|
||||
for (auto script : EntityManager::Instance()->GetEntitiesByComponent(COMPONENT_TYPE_SCRIPT)) {
|
||||
for (auto script : EntityManager::Instance()->GetEntitiesByComponent(eReplicaComponentType::SCRIPT)) {
|
||||
|
||||
AgMonumentLaserServer* hasLaser = (AgMonumentLaserServer*)script;
|
||||
|
||||
|
Reference in New Issue
Block a user