Update player.cpp

fixed validator stuff
This commit is contained in:
Sir-Skurpsalot 2026-04-15 17:08:10 -06:00 committed by GitHub
parent b351b3ffbe
commit 7e72dfba81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1005,27 +1005,27 @@ void PlayerData::initPersistFields()
"@see boundingBox" ); "@see boundingBox" );
// Damage collision boxes changed by Skurps // Damage collision boxes changed by Skurps
addField( "boxHeadPercentage", TypeF32, Offset(boxHeadPercentage, PlayerData), &CommonValidators::NormalizedFloat, addFieldV( "boxHeadPercentage", TypeRangedF32, Offset(boxHeadPercentage, PlayerData), &CommonValidators::NormalizedFloat,
"@brief Percentage of the player's bounding box height that represents the head.\n\n" "@brief Percentage of the player's bounding box height that represents the head.\n\n"
"Used when computing the damage location.\n" "Used when computing the damage location.\n"
"@see Player::getDamageLocation" ); "@see Player::getDamageLocation" );
addField( "boxTorsoPercentage", TypeF32, Offset(boxTorsoPercentage, PlayerData), &CommonValidators::NormalizedFloat, addFieldV( "boxTorsoPercentage", TypeRangedF32, Offset(boxTorsoPercentage, PlayerData), &CommonValidators::NormalizedFloat,
"@brief Percentage of the player's bounding box height that represents the torso.\n\n" "@brief Percentage of the player's bounding box height that represents the torso.\n\n"
"Used when computing the damage location.\n" "Used when computing the damage location.\n"
"@see Player::getDamageLocation" ); "@see Player::getDamageLocation" );
addField( "boxTorsoLeftPercentage", TypeF32, Offset(boxTorsoLeftPercentage, PlayerData), &CommonValidators::NormalizedFloat, addFieldV( "boxTorsoLeftPercentage", TypeRangedF32, Offset(boxTorsoLeftPercentage, PlayerData), &CommonValidators::NormalizedFloat,
"@brief Percentage of the player's bounding box width that represents the left side of the torso.\n\n" "@brief Percentage of the player's bounding box width that represents the left side of the torso.\n\n"
"Used when computing the damage location.\n" "Used when computing the damage location.\n"
"@see Player::getDamageLocation" ); "@see Player::getDamageLocation" );
addField( "boxTorsoRightPercentage", TypeF32, Offset(boxTorsoRightPercentage, PlayerData), &CommonValidators::NormalizedFloat, addFieldV( "boxTorsoRightPercentage", TypeRangedF32, Offset(boxTorsoRightPercentage, PlayerData), &CommonValidators::NormalizedFloat,
"@brief Percentage of the player's bounding box width that represents the right side of the torso.\n\n" "@brief Percentage of the player's bounding box width that represents the right side of the torso.\n\n"
"Used when computing the damage location.\n" "Used when computing the damage location.\n"
"@see Player::getDamageLocation" ); "@see Player::getDamageLocation" );
addField( "boxTorsoBackPercentage", TypeF32, Offset(boxTorsoBackPercentage, PlayerData), &CommonValidators::NormalizedFloat, addFieldV( "boxTorsoBackPercentage", TypeRangedF32, Offset(boxTorsoBackPercentage, PlayerData), &CommonValidators::NormalizedFloat,
"@brief Percentage of the player's bounding box depth that represents the back side of the torso.\n\n" "@brief Percentage of the player's bounding box depth that represents the back side of the torso.\n\n"
"Used when computing the damage location.\n" "Used when computing the damage location.\n"
"@see Player::getDamageLocation" ); "@see Player::getDamageLocation" );
addField( "boxTorsoFrontPercentage", TypeF32, Offset(boxTorsoFrontPercentage, PlayerData), &CommonValidators::NormalizedFloat, addFieldV( "boxTorsoFrontPercentage", TypeRangedF32, Offset(boxTorsoFrontPercentage, PlayerData), &CommonValidators::NormalizedFloat,
"@brief Percentage of the player's bounding box depth that represents the front side of the torso.\n\n" "@brief Percentage of the player's bounding box depth that represents the front side of the torso.\n\n"
"Used when computing the damage location.\n" "Used when computing the damage location.\n"
"@see Player::getDamageLocation" ); "@see Player::getDamageLocation" );