Skip to content

Commit

Permalink
Remove TraceFirePortal using non-test shot
Browse files Browse the repository at this point in the history
  • Loading branch information
evanlin96069 authored and lipsanen committed Nov 29, 2022
1 parent 1927e3f commit 1557512
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
12 changes: 2 additions & 10 deletions spt/features/tracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,8 @@ float Tracing::TraceTransformFirePortal(trace_t& tr,

const int PORTAL_PLACED_BY_PLAYER = 2;

return ORIG_TraceFirePortal(weapon,
0,
isPortal2,
transformedPos,
vDirection,
tr,
finalPos,
finalAngles,
PORTAL_PLACED_BY_PLAYER,
false);
return ORIG_TraceFirePortal(
weapon, 0, isPortal2, transformedPos, vDirection, tr, finalPos, finalAngles, PORTAL_PLACED_BY_PLAYER, true);
}

#endif
Expand Down
7 changes: 4 additions & 3 deletions spt/features/visualizations/portal_placement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ ConVar y_spt_hud_portal_placement("y_spt_hud_portal_placement",
"0",
FCVAR_CHEAT,
"Show portal placement info\n"
"1 = Boolean result\n"
"2 = String result\n"
"3 = Float result");
" 1 = Boolean result\n"
" 2 = String result\n"
" 3 = Float result");
ConVar y_spt_draw_pp("y_spt_draw_pp", "0", FCVAR_CHEAT, "Draw portal placement.");
ConVar y_spt_draw_pp_blue("y_spt_draw_pp_blue", "1", FCVAR_CHEAT, "Draw blue portal placement.");
ConVar y_spt_draw_pp_orange("y_spt_draw_pp_orange", "1", FCVAR_CHEAT, "Draw orange portal placement.");
Expand Down Expand Up @@ -173,6 +173,7 @@ static const wchar_t* PlacementResultToString(float placement)
if (placement == PORTAL_PLACEMENT_SUCCESS_OVERLAP_LINKED)
return L"Overlaps existing portal";
if (placement == PORTAL_PLACEMENT_SUCCESS_NEAR)
// Not possible for non-test shot
return L"Near existing portal";
if (placement == PORTAL_PLACEMENT_SUCCESS_INVALID_VOLUME)
return L"Invalid volume";
Expand Down

0 comments on commit 1557512

Please sign in to comment.