mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-01 09:18:00 +03:00
Merge branch 'entities_fixings'
# Conflicts: # TR5Main/Renderer/Renderer11Draw.cpp
This commit is contained in:
commit
f35d6e80d0
5 changed files with 44 additions and 11 deletions
|
@ -382,10 +382,20 @@ void TestTriggers(short* data, bool heavy, int heavyFlags)
|
|||
item->flags & ATONESHOT)
|
||||
break;
|
||||
|
||||
if (triggerType == TRIGGER_TYPES::SWITCH)
|
||||
if (triggerType == TRIGGER_TYPES::SWITCH && item->flags & SWONESHOT)
|
||||
break;
|
||||
|
||||
if (triggerType != TRIGGER_TYPES::SWITCH
|
||||
&& triggerType != TRIGGER_TYPES::ANTIPAD
|
||||
&& triggerType != TRIGGER_TYPES::ANTITRIGGER
|
||||
&& triggerType != TRIGGER_TYPES::HEAVYANTITRIGGER
|
||||
&& (item->flags & ONESHOT))
|
||||
break;
|
||||
|
||||
if (triggerType != TRIGGER_TYPES::ANTIPAD
|
||||
&& triggerType != TRIGGER_TYPES::ANTITRIGGER
|
||||
&& triggerType != TRIGGER_TYPES::HEAVYANTITRIGGER)
|
||||
{
|
||||
if (item->flags & SWONESHOT)
|
||||
break;
|
||||
if (item->objectNumber == ID_DART_EMITTER && item->active)
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -471,9 +471,9 @@ namespace TEN::Entities::Effects
|
|||
{
|
||||
if (item->triggerFlags == 2 || item->triggerFlags == 4)
|
||||
{
|
||||
dest.x = item->pos.xPos + 512 * phd_sin(item->pos.yRot + ANGLE(180));
|
||||
dest.x = item->pos.xPos + 2048 * phd_sin(item->pos.yRot + ANGLE(180));
|
||||
dest.y = item->pos.yPos;
|
||||
dest.z = item->pos.zPos + 512 * phd_cos(item->pos.yRot + ANGLE(180));
|
||||
dest.z = item->pos.zPos + 2048 * phd_cos(item->pos.yRot + ANGLE(180));
|
||||
|
||||
if (GetRandomControl() & 3)
|
||||
{
|
||||
|
@ -499,7 +499,7 @@ namespace TEN::Entities::Effects
|
|||
g,
|
||||
b,
|
||||
32,
|
||||
1,
|
||||
LI_SPLINE,
|
||||
32,
|
||||
3);
|
||||
}
|
||||
|
@ -542,7 +542,7 @@ namespace TEN::Entities::Effects
|
|||
g,
|
||||
b,
|
||||
32,
|
||||
1,
|
||||
LI_SPLINE,
|
||||
32,
|
||||
5);
|
||||
}
|
||||
|
@ -569,7 +569,7 @@ namespace TEN::Entities::Effects
|
|||
g,
|
||||
b,
|
||||
24,
|
||||
3,
|
||||
LI_SPLINE | LI_MOVEEND,
|
||||
32,
|
||||
3);
|
||||
TriggerLightningGlow(dest.x, dest.y, dest.z, 64, 0, g, b);
|
||||
|
|
|
@ -507,12 +507,13 @@ namespace TEN::Renderer
|
|||
void drawStatics(bool transparent, RenderView& view);
|
||||
void renderShadowMap(RenderView& view);
|
||||
void drawWraithExtra(RenderView& view,RendererItem* item, bool transparent, bool animated);
|
||||
void drawDarts(RenderView& view, RendererItem* item, bool transparent, bool animated);
|
||||
void drawLara(RenderView& view,bool transparent, bool shadowMap);
|
||||
void printDebugMessage(LPCSTR message, ...);
|
||||
void drawFires(RenderView& view);
|
||||
void drawSparks(RenderView& view);
|
||||
void drawSmokes(RenderView& view);
|
||||
void drawEnergyArcs(RenderView& view);
|
||||
void drawLightning(RenderView& view);
|
||||
void drawBlood(RenderView& view);
|
||||
void drawDrips(RenderView& view);
|
||||
void drawBubbles(RenderView& view);
|
||||
|
|
|
@ -2841,7 +2841,7 @@ namespace TEN::Renderer
|
|||
//drawUnderwaterDust(view);
|
||||
drawSplahes(view);
|
||||
drawShockwaves(view);
|
||||
drawEnergyArcs(view);
|
||||
drawLightning(view);
|
||||
|
||||
drawRopes(view);
|
||||
drawSprites(view);
|
||||
|
@ -2956,6 +2956,11 @@ namespace TEN::Renderer
|
|||
drawAnimatingItem(view,item, transparent, animated);
|
||||
drawWraithExtra(view,item, transparent, animated);
|
||||
}
|
||||
else if (objectNumber == ID_DARTS)
|
||||
{
|
||||
//TODO: for now legacy way, in the future mesh
|
||||
drawDarts(view, item, transparent, animated);
|
||||
}
|
||||
else
|
||||
{
|
||||
drawAnimatingItem(view,item, transparent, animated);
|
||||
|
@ -3025,6 +3030,23 @@ namespace TEN::Renderer
|
|||
}
|
||||
}
|
||||
|
||||
void Renderer11::drawDarts(RenderView& view, RendererItem* item, bool transparent, bool animated)
|
||||
{
|
||||
Vector3 start = Vector3(
|
||||
item->Item->pos.xPos,
|
||||
item->Item->pos.yPos,
|
||||
item->Item->pos.zPos);
|
||||
|
||||
float speed = (-96 * phd_cos(TO_RAD(item->Item->pos.xRot)));
|
||||
|
||||
Vector3 end = Vector3(
|
||||
item->Item->pos.xPos + speed * phd_sin(TO_RAD(item->Item->pos.yRot)),
|
||||
item->Item->pos.yPos + 96 * phd_sin(TO_RAD(item->Item->pos.xRot)),
|
||||
item->Item->pos.zPos + speed * phd_cos(TO_RAD(item->Item->pos.yRot)));
|
||||
|
||||
addLine3D(start, end, Vector4(30 / 255.0f, 30 / 255.0f, 30 / 255.0f, 0.5f));
|
||||
}
|
||||
|
||||
void Renderer11::drawWraithExtra(RenderView& view,RendererItem* item, bool transparent, bool animated)
|
||||
{
|
||||
ITEM_INFO* nativeItem = item->Item;
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace TEN::Renderer
|
|||
using namespace TEN::Effects::Footprints;
|
||||
using std::vector;
|
||||
|
||||
void Renderer11::drawEnergyArcs(RenderView& view) {
|
||||
void Renderer11::drawLightning(RenderView& view) {
|
||||
for (int i = 0; i < Lightning.size(); i++)
|
||||
{
|
||||
LIGHTNING_INFO* arc = &Lightning[i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue