Skip to content

Commit

Permalink
Doesn't fix lamp posts
Browse files Browse the repository at this point in the history
  • Loading branch information
MortonPL committed Feb 13, 2024
1 parent d4eb4e7 commit 0812230
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/Ext/TAction/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,16 @@ DEFINE_HOOK(0x6E2EA7, TActionClass_Retint_LightSourceFix, 0x3) // Red
return 0;
}

// Same as above, but needed to work with pr#1202.
// See Misc/Hooks.MapTint.cpp hook @ 0x683E7F.
DEFINE_HOOK(0x683E94, Start_Scenario_RetintLightSourceFix, 0x5)
{
// Flag the light sources to update, actually do it later and only once to prevent redundancy.
RetintTemp::UpdateLightSources = true;

return 0;
}

// Update light sources if they have been flagged to be updated.
DEFINE_HOOK(0x6D4455, Tactical_Render_UpdateLightSources, 0x8)
{
Expand Down
2 changes: 0 additions & 2 deletions src/Misc/Hooks.MapTint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,12 @@ DEFINE_HOOK(0x53AD00, ScenarioClass_RecalcLighting_TintTiberiumDrawer, 5)
DEFINE_HOOK(0x47F94B, CellClass_DrawOverlay_ReplaceTiberiumDrawer_1, 6)
{
R->EDX(MapTintFix::TiberiumLightDrawer.get());
//*(int*)(R->ESP() + 12) = 0;
return 0x47F951;
}

DEFINE_HOOK(0x47FA5C, CellClass_DrawOverlay_ReplaceTiberiumDrawer_2, 6)
{
R->EDX(MapTintFix::TiberiumLightDrawer.get());
//*(int*)(R->ESP() + 8) = 0;
return 0x47FA62;
}

Expand Down

0 comments on commit 0812230

Please sign in to comment.