forked from phenom/healer-man
Update Healer Man server
This commit is contained in:
1 parent
71246e5b75
commit
a868401ebc
40 files changed
+1522
-161
No files matched your search
Binary file not shown.
Binary file not shown.
@@ -21,6 +21,9 @@
|
||||
#include "Rune Engine/Rune/Scene/Base/RuHierarchy_GR2.h"
|
||||
#include "Rune Engine/Rune/Scene/Controller/RuController_Hierarchy.h"
|
||||
#include "Rune Engine/Rune/Scene/Controller/RuController_EventTrigger.h"
|
||||
#include "Rune Engine/Rune/Scene/Controller/RuController_GlobalAlpha.h"
|
||||
#include "Rune Engine/Rune/Scene/Controller/RuController_Decal.h"
|
||||
#include "Rune Engine/Rune/Scene/Controller/RuController_Particle_Visualizer_Entity.h"
|
||||
#include "Rune Engine/Rune/Scene/Controller/RuController_Particle_Emitter.h"
|
||||
#include "Rune Engine/Rune/Scene/Controller/RuController_Particle_Visualizer_Sprite.h"
|
||||
#include "Rune Engine/Rune/Scene/Terrain/RuWorld_Base.h"
|
||||
@@ -1507,6 +1510,20 @@ namespace
|
||||
{ WriteFxRealTrack(out, **track); return; }
|
||||
if(CRuAnimTrack<CRuColor4> **track = boost::get<CRuAnimTrack<CRuColor4> *>(&variant))
|
||||
{ WriteFxColorTrack(out, **track); return; }
|
||||
if(CRuAnimTrack<char *> **track = boost::get<CRuAnimTrack<char *> *>(&variant))
|
||||
{
|
||||
out << "[";
|
||||
for(INT32 key = 0; key < (*track)->GetNumKeys(); ++key)
|
||||
{
|
||||
REAL time = 0; char *value = NULL;
|
||||
(*track)->GetKeyTimeByIndex(key, &time); (*track)->GetKeyByIndex(key, &value);
|
||||
if(key) out << ",";
|
||||
out << "{\"time\":" << FiniteFxValue(time) << ",\"value\":\""
|
||||
<< JsonEscape(value ? value : "") << "\"}";
|
||||
}
|
||||
out << "]";
|
||||
return;
|
||||
}
|
||||
out << "[";
|
||||
if(CRuAnimTrack<INT32> **track = boost::get<CRuAnimTrack<INT32> *>(&variant))
|
||||
{
|
||||
@@ -1565,9 +1582,14 @@ namespace
|
||||
const bool isSprite = base->GetType().IsSubClassOf(CRuController_Particle_Visualizer_Sprite::Type());
|
||||
const bool isEmitter = base->GetType().IsSubClassOf(CRuController_Particle_Emitter::Type());
|
||||
const bool isEventTrigger = base->GetType().IsSubClassOf(CRuController_EventTrigger::Type());
|
||||
const bool isGlobalAlpha = base->GetType().IsSubClassOf(CRuController_GlobalAlpha::Type());
|
||||
const bool isEntityVisualizer = base->GetType().IsSubClassOf(CRuController_Particle_Visualizer_Entity::Type());
|
||||
const bool isDecal = base->GetType().IsSubClassOf(CRuController_Decal::Type());
|
||||
const bool isGlobalColor = base->GetType().IsSubClassOf(CRuController_GlobalColor::Type());
|
||||
if(wroteController) out << ",";
|
||||
wroteController = true;
|
||||
out << "{\"type\":\"" << (isSprite ? "sprite" : isEmitter ? "emitter" : "unsupported")
|
||||
out << "{\"type\":\"" << (isSprite ? "sprite" : isEmitter ? "emitter" : isGlobalAlpha ? "global-alpha"
|
||||
: isEntityVisualizer ? "entity-visualizer" : isDecal ? "decal" : isGlobalColor ? "global-color" : "unsupported")
|
||||
<< "\",\"sourceType\":\"" << JsonEscape(base->GetType().GetTypeName())
|
||||
<< "\",\"anchor\":\"" << JsonEscape(node->GetAnchorTarget() ? node->GetAnchorTarget() : "") << "\"";
|
||||
if(isEventTrigger)
|
||||
@@ -1580,6 +1602,37 @@ namespace
|
||||
<< ",\"eventDuration\":" << FiniteFxValue(trigger->GetEventDuration())
|
||||
<< ",\"startTime\":" << FiniteFxValue(trigger->GetStartTime());
|
||||
}
|
||||
if(isGlobalAlpha)
|
||||
{
|
||||
CRuController_GlobalAlpha *alpha = static_cast<CRuController_GlobalAlpha *>(base);
|
||||
out << ",\"startTime\":" << FiniteFxValue(alpha->GetStartTime())
|
||||
<< ",\"duration\":" << FiniteFxValue(alpha->GetDuration())
|
||||
<< ",\"alphaTrack\":";
|
||||
WriteFxControllerTrack(out, alpha, 1);
|
||||
}
|
||||
if(isEntityVisualizer)
|
||||
{
|
||||
CRuController_Particle_Visualizer_Entity *visualizer = static_cast<CRuController_Particle_Visualizer_Entity *>(base);
|
||||
out << ",\"entityName\":\"" << JsonEscape(visualizer->GetEntityName()) << "\""
|
||||
<< ",\"orientToTravel\":" << (visualizer->GetOrientToDirectionOfTravel() ? "true" : "false");
|
||||
}
|
||||
if(isDecal)
|
||||
{
|
||||
CRuController_Decal *decal = static_cast<CRuController_Decal *>(base);
|
||||
RuAnimTrackVariant textureVariant;
|
||||
const char *textureName = "";
|
||||
if(decal->GetTrackByIndex(0, textureVariant))
|
||||
{
|
||||
if(CRuAnimTrack<char *> **track = boost::get<CRuAnimTrack<char *> *>(&textureVariant))
|
||||
{
|
||||
char *firstKey = NULL;
|
||||
if((*track)->GetNumKeys() > 0 && (*track)->GetKeyByIndex(0, &firstKey) && firstKey)
|
||||
textureName = firstKey;
|
||||
}
|
||||
}
|
||||
out << ",\"decalTexture\":\"" << JsonEscape(textureName) << "\""
|
||||
<< ",\"billboardType\":" << static_cast<INT32>(decal->GetBillboardType());
|
||||
}
|
||||
if(isSprite)
|
||||
{
|
||||
CRuController_Particle_Visualizer_Sprite *sprite = static_cast<CRuController_Particle_Visualizer_Sprite *>(base);
|
||||
@@ -1616,7 +1669,7 @@ namespace
|
||||
out << ",\"emitterOrientation\":" << static_cast<INT32>(emitter->GetEmitterOrientation());
|
||||
out << ",\"prerunTime\":" << FiniteFxValue(emitter->GetEmitterPrerunTime());
|
||||
}
|
||||
if(isSprite || isEmitter)
|
||||
if(isSprite || isEmitter || isEntityVisualizer || isDecal || isGlobalColor)
|
||||
{
|
||||
IRuEntity_KeyableController *keyable = static_cast<IRuEntity_KeyableController *>(base);
|
||||
out << ",\"tracks\":[";
|
||||
|
||||
Reference in new issue
Block a user