summaryrefslogtreecommitdiff
path: root/src/engine/objects/Seagull.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/objects/Seagull.cpp')
-rw-r--r--src/engine/objects/Seagull.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/engine/objects/Seagull.cpp b/src/engine/objects/Seagull.cpp
index 17c35c07d..61a7f39ca 100644
--- a/src/engine/objects/Seagull.cpp
+++ b/src/engine/objects/Seagull.cpp
@@ -31,12 +31,11 @@ SplineData* D_800E633C[] = { &D_800E6034, &D_800E60F0, &D_800E61B4, &D_800E6280
size_t OSeagull::_count = 0;
-OSeagull::OSeagull(FVector pos) {
+OSeagull::OSeagull(const SpawnParams& params) : OObject(params) {
Name = "Seagull";
+ ResourceName = "mk:seagull";
_idx = _count;
- _pos.x = pos.x;
- _pos.y = pos.y;
- _pos.z = pos.z;
+ FVector pos = params.Location.value_or(FVector(0, 0, 0));
s16 randZ;
s16 randX;
@@ -49,6 +48,11 @@ OSeagull::OSeagull(FVector pos) {
init_object(_objectIndex, 0);
+ Object* object = &gObjectList[_objectIndex];
+
+ object->pos[0] = pos.x;
+ object->pos[1] = pos.y;
+ object->pos[2] = pos.z;
set_obj_origin_pos(_objectIndex, pos.x, pos.y, pos.z);
if (_idx < (NUM_SEAGULLS / 2)) {
@@ -171,7 +175,8 @@ void OSeagull::func_8008241C(s32 objectIndex, s32 arg1) {
randY = random_int(0x0014);
randZ = random_int(0x00C8) + -100.0;
- set_obj_origin_pos(objectIndex, (randX + _pos.x) * xOrientation, randY + _pos.y, randZ + _pos.z);
+ FVector pos = SpawnPos;
+ set_obj_origin_pos(objectIndex, (randX + pos.x) * xOrientation, randY + pos.y, randZ + pos.z);
set_obj_direction_angle(objectIndex, 0U, 0U, 0U);
gObjectList[objectIndex].unk_034 = 1.0f;
func_80086EF0(objectIndex);