Nak2/StormFox2

error when loading TF2 map cp_5gorge

EntranceJew opened this issue · 1 comments

[StormFox 2] lua/stormfox2/framework/cl_envioment.lua:921: lua/stormfox2/framework/cl_envioment.lua:667: bad argument #1 to 'ipairs' (table expected, got no value)
    1. cor_scan - [C]:-1
        2. unknown - lua/stormfox2/framework/cl_envioment.lua:921

sometimes surf can be nil, i'm not sure what the correct behavior is in this circumstance so i can't adequately submit a PR for it

for _,t in ipairs(surf:GetMesh()) do

Nak2 commented

Patched in hotfix.
Surfaces are a bit buggy in many cases. Willox said that he couldn't locate the problems I gave him, after he added the function.

Sadly unsolvable for now, but added a safeguard against it causing errors.