More OBJ_FLAG_UCODE_LARGE usage + fix Mr. I scaling
This commit is contained in:
1 parent
2badfe6ce0
commit
fe9d1f93b1
7 files changed
+30
-112
No files matched your search
@@ -219,6 +219,7 @@ void mr_i_act_0(void) {
|
||||
o->oMoveAngleRoll = 0;
|
||||
#endif
|
||||
cur_obj_scale(o->oBehParams2ndByte + 1);
|
||||
o->oGraphYOffset = 100.0f * o->header.gfx.scale[1];
|
||||
if (o->oTimer == 0)
|
||||
cur_obj_set_pos_to_home();
|
||||
if (o->oDistanceToMario < 1500.0f)
|
||||
|
||||
@@ -289,7 +289,7 @@ void mario_stop_riding_object(struct MarioState *m) {
|
||||
void mario_grab_used_object(struct MarioState *m) {
|
||||
if (m->heldObj == NULL) {
|
||||
m->heldObj = m->usedObj;
|
||||
obj_set_held_state(m->heldObj, bhvCarrySomething3);
|
||||
obj_set_held_state(m->heldObj, bhvCarrySomethingHeld);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ void mario_drop_held_object(struct MarioState *m) {
|
||||
stop_shell_music();
|
||||
}
|
||||
|
||||
obj_set_held_state(m->heldObj, bhvCarrySomething4);
|
||||
obj_set_held_state(m->heldObj, bhvCarrySomethingDropped);
|
||||
|
||||
// ! When dropping an object instead of throwing it, it will be put at Mario's
|
||||
// y-positon instead of the HOLP's y-position. This fact is often exploited when
|
||||
@@ -320,7 +320,7 @@ void mario_throw_held_object(struct MarioState *m) {
|
||||
stop_shell_music();
|
||||
}
|
||||
|
||||
obj_set_held_state(m->heldObj, bhvCarrySomething5);
|
||||
obj_set_held_state(m->heldObj, bhvCarrySomethingThrown);
|
||||
|
||||
m->heldObj->oPosX = m->marioBodyState->heldObjLastPosition[0] + 32.0f * sins(m->faceAngle[1]);
|
||||
m->heldObj->oPosY = m->marioBodyState->heldObjLastPosition[1];
|
||||
|
||||
@@ -263,15 +263,15 @@ void obj_set_held_state(struct Object *obj, const BehaviorScript *heldBehavior)
|
||||
obj->parentObj = o;
|
||||
|
||||
if (obj->oFlags & OBJ_FLAG_HOLDABLE) {
|
||||
if (heldBehavior == bhvCarrySomething3) {
|
||||
if (heldBehavior == bhvCarrySomethingHeld) {
|
||||
obj->oHeldState = HELD_HELD;
|
||||
}
|
||||
|
||||
if (heldBehavior == bhvCarrySomething5) {
|
||||
if (heldBehavior == bhvCarrySomethingThrown) {
|
||||
obj->oHeldState = HELD_THROWN;
|
||||
}
|
||||
|
||||
if (heldBehavior == bhvCarrySomething4) {
|
||||
if (heldBehavior == bhvCarrySomethingDropped) {
|
||||
obj->oHeldState = HELD_DROPPED;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user