Fix sourcepawn bug
This commit is contained in:
parent
657102ea76
commit
eda8971996
@ -1429,8 +1429,7 @@ stock ClassDataTypes:ClassGetAttributeType(attributeflag)
|
|||||||
ZR_CLASS_HEALTH_REGEN_INTERVAL,
|
ZR_CLASS_HEALTH_REGEN_INTERVAL,
|
||||||
ZR_CLASS_SPEED,
|
ZR_CLASS_SPEED,
|
||||||
ZR_CLASS_KNOCKBACK,
|
ZR_CLASS_KNOCKBACK,
|
||||||
ZR_CLASS_JUMP_HEIGHT,
|
ZR_CLASS_JUMP_HEIGHT:
|
||||||
ZR_CLASS_JUMP_DISTANCE:
|
|
||||||
{
|
{
|
||||||
return ClassDataType_Float;
|
return ClassDataType_Float;
|
||||||
}
|
}
|
||||||
@ -1446,6 +1445,15 @@ stock ClassDataTypes:ClassGetAttributeType(attributeflag)
|
|||||||
{
|
{
|
||||||
return ClassDataType_String;
|
return ClassDataType_String;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
// sourcepawn bug fix
|
||||||
|
if (attributeflag == ZR_CLASS_JUMP_DISTANCE)
|
||||||
|
{
|
||||||
|
return ClassDataType_Float;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Invalid flag or multiple flags combined.
|
// Invalid flag or multiple flags combined.
|
||||||
|
@ -873,7 +873,10 @@ stock ClassModifyFloat(classindex, attributeflag, Float:value, bool:ismultiplier
|
|||||||
ClassDataCache[classindex][Class_JumpHeight] = value;
|
ClassDataCache[classindex][Class_JumpHeight] = value;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
case ZR_CLASS_JUMP_DISTANCE:
|
default:
|
||||||
|
{
|
||||||
|
// sourcepawn bug fix
|
||||||
|
if (attributeflag == ZR_CLASS_JUMP_DISTANCE)
|
||||||
{
|
{
|
||||||
if (ismultiplier)
|
if (ismultiplier)
|
||||||
{
|
{
|
||||||
@ -883,6 +886,7 @@ stock ClassModifyFloat(classindex, attributeflag, Float:value, bool:ismultiplier
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Invalid flag or multiple flags combined.
|
// Invalid flag or multiple flags combined.
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user