summaryrefslogtreecommitdiff
path: root/src/enemy/sub_080451CC.c
blob: 85379354860467874207ad1930d5a1742759316c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "entity.h"

void sub_080451CC(GenericEntity* this, GenericEntity* other) {
    u8* pThis;
    u8* pOther;
    other->base.flags = this->base.flags & ~ENT_DID_INIT;
    other->base.x.WORD = this->base.x.WORD;
    other->base.y.WORD = this->base.y.WORD;
    other->base.z.WORD = this->base.z.WORD;

    pThis = (u8*)&this->field_0x68;
    pOther = (u8*)&other->field_0x68;
    pOther[4] = pThis[4];
    pOther[5] = pThis[5];
    pOther[6] = pThis[6];
    pOther[7] = pThis[7];
    ((u16*)(pOther))[4] = ((u16*)(pThis))[4];
    ((u16*)(pOther))[5] = ((u16*)(pThis))[5];
}