mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 05:25:14 +00:00
Fix gBehaviorValues.GrateStarRequirement and add gBehaviorValues.Chil… (#471)
* Fix gBehaviorValues.GrateStarRequirement and add gBehaviorValues.ChillyChiefDeathPosY For some reason, the castle_cannon_grate.inc.c file was unaltered so gBehaviorValues.GrateStarRequirement would not do anything. gBehaviorValues.ChillyChiefDeathPosY is self explanatory, it lets you change the Y position where the Chilly Chief bully dies. * ChillyChiefDeathPosY -> ChillBullyDeathPosY --------- Co-authored-by: <peachy.peach.sm64@gmail.com>
This commit is contained in:
parent
40fe8ef649
commit
22761949f7
7 changed files with 8 additions and 3 deletions
|
@ -183,6 +183,7 @@
|
|||
--- @field public BowlingBallThiLargeSpeed number
|
||||
--- @field public BowlingBallThiSmallSpeed number
|
||||
--- @field public BowlingBallTtmSpeed number
|
||||
--- @field public ChillBullyDeathPosY number
|
||||
--- @field public GrateStarRequirement integer
|
||||
--- @field public InfiniteRenderDistance integer
|
||||
--- @field public KingBobombFVel number
|
||||
|
|
|
@ -314,6 +314,7 @@
|
|||
| BowlingBallThiLargeSpeed | `number` | |
|
||||
| BowlingBallThiSmallSpeed | `number` | |
|
||||
| BowlingBallTtmSpeed | `number` | |
|
||||
| ChillBullyDeathPosY | `number` | |
|
||||
| GrateStarRequirement | `integer` | |
|
||||
| InfiniteRenderDistance | `integer` | |
|
||||
| KingBobombFVel | `number` | |
|
||||
|
|
|
@ -242,7 +242,7 @@ void bully_step(void) {
|
|||
obj_check_floor_death(collisionFlags, sObjFloor);
|
||||
|
||||
if (o->oBullySubtype & BULLY_STYPE_CHILL) {
|
||||
if (o->oPosY < 1030.0f) {
|
||||
if (o->oPosY < gBehaviorValues.ChillBullyDeathPosY) {
|
||||
o->oAction = BULLY_ACT_LAVA_DEATH;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// castle_cannon_grate.inc.c
|
||||
|
||||
void bhv_castle_cannon_grate_init(void) {
|
||||
if (save_file_get_total_star_count(gCurrSaveFileNum - 1, COURSE_MIN - 1, COURSE_MAX - 1) >= 120) {
|
||||
if (save_file_get_total_star_count(gCurrSaveFileNum - 1, COURSE_MIN - 1, COURSE_MAX - 1) >= gBehaviorValues.GrateStarRequirement) {
|
||||
o->activeFlags = ACTIVE_FLAG_DEACTIVATED;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,6 +151,7 @@ struct BehaviorValues gDefaultBehaviorValues = {
|
|||
.BowlingBallThiLargeSpeed = 25.0f,
|
||||
.BowlingBallThiSmallSpeed = 10.0f,
|
||||
.GrateStarRequirement = 120,
|
||||
.ChillBullyDeathPosY = 1030.0f,
|
||||
.ShowStarMilestones = TRUE,
|
||||
.RespawnShellBoxes = TRUE,
|
||||
.MultipleCapCollection = FALSE,
|
||||
|
|
|
@ -248,6 +248,7 @@ struct BehaviorValues {
|
|||
f32 BowlingBallThiLargeSpeed;
|
||||
f32 BowlingBallThiSmallSpeed;
|
||||
u16 GrateStarRequirement;
|
||||
f32 ChillBullyDeathPosY;
|
||||
u8 ShowStarMilestones;
|
||||
u8 RespawnShellBoxes;
|
||||
u8 MultipleCapCollection;
|
||||
|
|
|
@ -216,13 +216,14 @@ static struct LuaObjectField sBehaviorTrajectoriesFields[LUA_BEHAVIOR_TRAJECTORI
|
|||
{ "UnagiTrajectory", LVT_TRAJECTORY_P, offsetof(struct BehaviorTrajectories, UnagiTrajectory), false, LOT_POINTER },
|
||||
};
|
||||
|
||||
#define LUA_BEHAVIOR_VALUES_FIELD_COUNT 29
|
||||
#define LUA_BEHAVIOR_VALUES_FIELD_COUNT 30
|
||||
static struct LuaObjectField sBehaviorValuesFields[LUA_BEHAVIOR_VALUES_FIELD_COUNT] = {
|
||||
{ "BowlingBallBob2Speed", LVT_F32, offsetof(struct BehaviorValues, BowlingBallBob2Speed), false, LOT_NONE },
|
||||
{ "BowlingBallBobSpeed", LVT_F32, offsetof(struct BehaviorValues, BowlingBallBobSpeed), false, LOT_NONE },
|
||||
{ "BowlingBallThiLargeSpeed", LVT_F32, offsetof(struct BehaviorValues, BowlingBallThiLargeSpeed), false, LOT_NONE },
|
||||
{ "BowlingBallThiSmallSpeed", LVT_F32, offsetof(struct BehaviorValues, BowlingBallThiSmallSpeed), false, LOT_NONE },
|
||||
{ "BowlingBallTtmSpeed", LVT_F32, offsetof(struct BehaviorValues, BowlingBallTtmSpeed), false, LOT_NONE },
|
||||
{ "ChillBullyDeathPosY", LVT_F32, offsetof(struct BehaviorValues, ChillBullyDeathPosY), false, LOT_NONE },
|
||||
{ "GrateStarRequirement", LVT_U16, offsetof(struct BehaviorValues, GrateStarRequirement), false, LOT_NONE },
|
||||
{ "InfiniteRenderDistance", LVT_U8, offsetof(struct BehaviorValues, InfiniteRenderDistance), false, LOT_NONE },
|
||||
{ "KingBobombFVel", LVT_F32, offsetof(struct BehaviorValues, KingBobombFVel), false, LOT_NONE },
|
||||
|
|
Loading…
Reference in a new issue