-
Notifications
You must be signed in to change notification settings - Fork 20
Enabled glows showing on ALL MovableObjects #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Source/Entities/AEmitter.cpp
Outdated
| @@ -339,6 +339,7 @@ void AEmitter::SetFlash(Attachable* newFlash) { | |||
| m_pFlash->SetInheritsRotAngle(false); | |||
| m_pFlash->SetDeleteWhenRemovedFromParent(true); | |||
| m_pFlash->SetCollidesWithTerrainWhileAttached(false); | |||
| m_pFlash->MovableObject::SetEffectDrawEveryFrame(false); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the manual disambiguation of MovableObject:: - this shouldn't be necessary.
Source/Entities/HDFirearm.cpp
Outdated
| @@ -407,6 +407,7 @@ void HDFirearm::SetFlash(Attachable* newFlash) { | |||
| m_pFlash->SetDrawnNormallyByParent(false); | |||
| m_pFlash->SetDeleteWhenRemovedFromParent(true); | |||
| m_pFlash->SetCollidesWithTerrainWhileAttached(false); | |||
| m_pFlash->MovableObject::SetEffectDrawEveryFrame(false); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above
Source/Entities/MovableObject.h
Outdated
| @@ -1058,6 +1067,9 @@ namespace RTE { | |||
| /// @return Whether this MO has requested a synced update this frame. | |||
| virtual bool HasRequestedSyncedUpdate() { return m_RequestedSyncedUpdate; } | |||
|
|
|||
| /// Sets the screen effect to draw at the final post-processing stage. | |||
| void SetPostScreenEffectToDraw() const; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably this should be private
Source/Entities/MovableObject.cpp
Outdated
| @@ -893,6 +894,10 @@ void MovableObject::Update() { | |||
| if (m_RandomizeEffectRotAngleEveryFrame) { | |||
| m_EffectRotAngle = c_PI * 2.0F * RandomNormalNum(); | |||
| } | |||
|
|
|||
| if (m_pScreenEffect && m_EffectDrawEveryFrame) { | |||
| MovableObject::SetPostScreenEffectToDraw(); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, no disambiguation needed here
|
As comments above, and the stuff we talked about in Discord about renaming EffectDrawEveryFrame |
…a readable, changed default to false outside of pixels and particles
Source/Entities/MOSParticle.cpp
Outdated
| @@ -20,6 +20,7 @@ MOSParticle::~MOSParticle() { | |||
| void MOSParticle::Clear() { | |||
| m_Atom = nullptr; | |||
| m_SpriteAnimMode = OVERLIFETIME; | |||
| m_PostEffectEnabled = true; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a comment describing why this is being done (backwards compat reasons)
Source/Entities/MOPixel.cpp
Outdated
| @@ -24,6 +24,7 @@ void MOPixel::Clear() { | |||
| m_MaxLethalRange = 1; | |||
| m_LethalSharpness = 1; | |||
| m_Staininess = 0; | |||
| m_PostEffectEnabled = true; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a comment describing why this is being done (backwards compat reasons)
Source/Entities/MovableObject.h
Outdated
| @@ -12,6 +12,7 @@ | |||
| #include "LuabindObjectWrapper.h" | |||
| #include "Material.h" | |||
| #include "MovableMan.h" | |||
| #include "PostProcessMan.h" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this in the .cpp, not the header
I'm not sure why this wasn't already a thing but screen effects now show on all MO's to which they're attached, provided they're not obscured (or you set
EffectAlwaysShows = 1).