mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 12:29:18 +02:00
Fix for 49b724fea1
This commit is contained in:
@@ -362,13 +362,13 @@ std::pair<int, int> TSubModel::Load(cParser &parser, bool dynamic)
|
|||||||
parser >> fNearAttenStart >> discard >> fNearAttenEnd >> discard >> bUseNearAtten >> discard >> iFarAttenDecay >> discard >> fFarDecayRadius >> discard >>
|
parser >> fNearAttenStart >> discard >> fNearAttenEnd >> discard >> bUseNearAtten >> discard >> iFarAttenDecay >> discard >> fFarDecayRadius >> discard >>
|
||||||
fCosFalloffAngle // kąt liczony dla średnicy, a nie promienia
|
fCosFalloffAngle // kąt liczony dla średnicy, a nie promienia
|
||||||
>> discard >> fCosHotspotAngle; // kąt liczony dla średnicy, a nie promienia
|
>> discard >> fCosHotspotAngle; // kąt liczony dla średnicy, a nie promienia
|
||||||
|
// trzeba pobrac do kolejki 2 tokeny
|
||||||
|
parser.getTokens(2);
|
||||||
if (parser.peek() == "hotspotpower:")
|
if (parser.peek() == "hotspotpower:")
|
||||||
{
|
{
|
||||||
parser.getTokens(2);
|
|
||||||
float multiplier;
|
float multiplier;
|
||||||
parser >> discard >> multiplier;
|
parser >> discard >> multiplier;
|
||||||
|
WriteLog("Found hotspot power!");
|
||||||
// recaluclate multiplier
|
// recaluclate multiplier
|
||||||
multiplier = multiplier / 100.f;
|
multiplier = multiplier / 100.f;
|
||||||
|
|
||||||
@@ -376,6 +376,8 @@ std::pair<int, int> TSubModel::Load(cParser &parser, bool dynamic)
|
|||||||
if (Global.NvRenderer)
|
if (Global.NvRenderer)
|
||||||
f4Diffuse *= multiplier;
|
f4Diffuse *= multiplier;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
parser.autoclear(false);
|
||||||
|
|
||||||
// convert conve parameters if specified in degrees
|
// convert conve parameters if specified in degrees
|
||||||
if (fCosFalloffAngle > 1.0)
|
if (fCosFalloffAngle > 1.0)
|
||||||
@@ -486,6 +488,7 @@ std::pair<int, int> TSubModel::Load(cParser &parser, bool dynamic)
|
|||||||
// visibility range
|
// visibility range
|
||||||
std::string discard;
|
std::string discard;
|
||||||
parser.getTokens(5, false);
|
parser.getTokens(5, false);
|
||||||
|
parser.autoclear(true);
|
||||||
parser >> discard >> fSquareMaxDist >> discard >> fSquareMinDist >> discard;
|
parser >> discard >> fSquareMaxDist >> discard >> fSquareMinDist >> discard;
|
||||||
|
|
||||||
if (fSquareMaxDist <= 0.0)
|
if (fSquareMaxDist <= 0.0)
|
||||||
|
|||||||
Reference in New Issue
Block a user