// Token: 0x06000673 RID: 1651 RVA: 0x00039AD4 File Offset: 0x00037CD4 public static void gmGmkTruckInitDeathFall(OBS_OBJECT_WORK obj_work, GMS_PLAYER_WORK ply_work) { AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)obj_work; gms_GMK_TRUCK_WORK.target_player = null; if (ply_work != null) { obj_work.spd = ply_work.obj_work.spd; obj_work.spd_m = ply_work.obj_work.spd_m; } else { obj_work.spd.x = 0; obj_work.spd.y = 0; obj_work.spd.z = 0; } AppMain.ObjObjectSpdDirFall(ref obj_work.spd.x, ref obj_work.spd.y, AppMain.g_gm_main_system.pseudofall_dir); obj_work.spd.x = AppMain.FX_Mul(obj_work.spd.x, 4608); obj_work.spd.y = AppMain.FX_Mul(obj_work.spd.y, 4608); obj_work.spd_add.x = 0; obj_work.spd_add.y = obj_work.spd_fall; AppMain.ObjObjectSpdDirFall(ref obj_work.spd_add.x, ref obj_work.spd_add.y, AppMain.g_gm_main_system.pseudofall_dir); obj_work.flag |= 2U; obj_work.flag &= 4294967279U; obj_work.move_flag |= 272U; obj_work.move_flag &= 4294958975U; obj_work.pos.z = 983040; obj_work.ppFunc = AppMain.gmGmkTruckDeathFallMain; }
// Token: 0x0600067C RID: 1660 RVA: 0x0003A5C0 File Offset: 0x000387C0 public static void gmGmkTruckCreateLightEfct(AppMain.GMS_GMK_TRUCK_WORK truck_work) { AppMain.GMS_EFFECT_3DES_WORK gms_EFFECT_3DES_WORK = AppMain.GmEfctZoneEsCreate((OBS_OBJECT_WORK)truck_work, 2, 10); gms_EFFECT_3DES_WORK.efct_com.obj_work.user_work_OBJECT = truck_work.light_pos; gms_EFFECT_3DES_WORK.efct_com.obj_work.ppFunc = AppMain.gmGmkTruckLightEfctMain; gms_EFFECT_3DES_WORK.efct_com.obj_work.ppOut = AppMain.gmGmkTruckLightEfctDispFunc; }
public static void gmGmkTruckCreateLightEfct(AppMain.GMS_GMK_TRUCK_WORK truck_work) { AppMain.GMS_EFFECT_3DES_WORK gmsEffect3DesWork = AppMain.GmEfctZoneEsCreate((AppMain.OBS_OBJECT_WORK)truck_work, 2, 10); gmsEffect3DesWork.efct_com.obj_work.user_work_OBJECT = (object)truck_work.light_pos; gmsEffect3DesWork.efct_com.obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkTruckLightEfctMain); gmsEffect3DesWork.efct_com.obj_work.ppOut = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkTruckLightEfctDispFunc); }
public static void gmGmkTruckFreeMain(AppMain.OBS_OBJECT_WORK obj_work) { AppMain.GMS_GMK_TRUCK_WORK truck_work = (AppMain.GMS_GMK_TRUCK_WORK)obj_work; if (((int)obj_work.move_flag & 1) != 0 && ((int)obj_work.move_flag & 16) != 0) { if (obj_work.spd.x > obj_work.spd_m) { obj_work.spd_m = obj_work.spd.x; } obj_work.spd.x = 0; obj_work.move_flag &= 4294967279U; if (obj_work.obj_3d.act_id[0] != 0) { AppMain.ObjDrawObjectActionSet3DNNBlend(obj_work, 0); obj_work.disp_flag |= 4U; } AppMain.GmSoundPlaySE("Lorry4"); } if (((int)obj_work.move_flag & 1) != 0) { obj_work.spd_m = AppMain.ObjSpdUpSet(obj_work.spd_m, 128, 40960); } else { obj_work.spd.x = AppMain.ObjSpdUpSet(obj_work.spd.x, 128, 40960); } truck_work.tire_dir_spd = ((int)obj_work.move_flag & 1) == 0 ? AppMain.ObjSpdDownSet(truck_work.tire_dir_spd, 128) : obj_work.spd_m; truck_work.tire_dir += (ushort)AppMain.FX_Div(truck_work.tire_dir_spd, 16384); if (((int)obj_work.move_flag & 1) != 0 && AppMain.MTM_MATH_ABS(obj_work.spd_m) >= AppMain.GMD_GMK_TRUCK_SPARK_EFCT_SMALL_MIN_SPD && (truck_work.efct_f_spark == null || truck_work.efct_b_spark == null)) { AppMain.gmGmkTruckCreateSparkEfct(truck_work, 27); } AppMain.gmGmkTruckSetMoveSeParam(obj_work, truck_work.h_snd_lorry, (AppMain.GMS_PLAYER_WORK)null, 1); }
// Token: 0x0600066F RID: 1647 RVA: 0x00039200 File Offset: 0x00037400 public static void gmGmkTruckInitMain(OBS_OBJECT_WORK obj_work, GMS_PLAYER_WORK ply_work) { AppMain.UNREFERENCED_PARAMETER(ply_work); AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)obj_work; obj_work.flag |= 2U; obj_work.move_flag |= 8448U; obj_work.ppFunc = AppMain.gmGmkTruckMain; AppMain.gmGmkTruckCreateSparkEfct(gms_GMK_TRUCK_WORK, 27); gms_GMK_TRUCK_WORK.h_snd_lorry = GsSound.AllocSeHandle(); }
public static void gmGmkTruckDest(AppMain.MTS_TASK_TCB tcb) { AppMain.GMS_GMK_TRUCK_WORK tcbWork = (AppMain.GMS_GMK_TRUCK_WORK)AppMain.mtTaskGetTcbWork(tcb); if (tcbWork.h_snd_lorry != null) { AppMain.GmSoundStopSE(tcbWork.h_snd_lorry); AppMain.GsSoundFreeSeHandle(tcbWork.h_snd_lorry); tcbWork.h_snd_lorry = (AppMain.GSS_SND_SE_HANDLE)null; } AppMain.GmEnemyDefaultExit(tcb); }
// Token: 0x0600066E RID: 1646 RVA: 0x000391BC File Offset: 0x000373BC public static void gmGmkTruckDest(MTS_TASK_TCB tcb) { AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)AppMain.mtTaskGetTcbWork(tcb); if (gms_GMK_TRUCK_WORK.h_snd_lorry != null) { GsSound.StopSE(gms_GMK_TRUCK_WORK.h_snd_lorry); GsSound.FreeSeHandle(gms_GMK_TRUCK_WORK.h_snd_lorry); gms_GMK_TRUCK_WORK.h_snd_lorry = null; } AppMain.GmEnemyDefaultExit(tcb); }
public static void gmGmkTruckInitMain( AppMain.OBS_OBJECT_WORK obj_work, AppMain.GMS_PLAYER_WORK ply_work) { AppMain.UNREFERENCED_PARAMETER((object)ply_work); AppMain.GMS_GMK_TRUCK_WORK truck_work = (AppMain.GMS_GMK_TRUCK_WORK)obj_work; obj_work.flag |= 2U; obj_work.move_flag |= 8448U; obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkTruckMain); AppMain.gmGmkTruckCreateSparkEfct(truck_work, 27); truck_work.h_snd_lorry = AppMain.GsSoundAllocSeHandle(); }
public static AppMain.OBS_OBJECT_WORK GmGmkTruckInit( AppMain.GMS_EVE_RECORD_EVENT eve_rec, int pos_x, int pos_y, byte type) { AppMain.OBS_OBJECT_WORK work = AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y, (AppMain.TaskWorkFactoryDelegate)(() => (object)new AppMain.GMS_GMK_TRUCK_WORK()), "GMK_TRUCK"); AppMain.GMS_ENEMY_3D_WORK gmsEnemy3DWork = (AppMain.GMS_ENEMY_3D_WORK)work; AppMain.GMS_GMK_TRUCK_WORK truck_work = (AppMain.GMS_GMK_TRUCK_WORK)work; AppMain.mtTaskChangeTcbDestructor(work.tcb, new AppMain.GSF_TASK_PROCEDURE(AppMain.gmGmkTruckDest)); AppMain.ObjObjectCopyAction3dNNModel(work, AppMain.gm_gmk_truck_obj_3d_list[0], gmsEnemy3DWork.obj_3d); AppMain.ObjObjectAction3dNNMotionLoad(work, 0, true, AppMain.ObjDataGet(930), (string)null, 0, (AppMain.AMS_AMB_HEADER)null); AppMain.ObjDrawObjectActionSet(work, 0); AppMain.ObjCopyAction3dNNModel(AppMain.gm_gmk_truck_obj_3d_list[1], truck_work.obj_3d_tire); gmsEnemy3DWork.obj_3d.mtn_cb_func = new AppMain.mtn_cb_func_delegate(AppMain.gmGmkTruckMotionCallback); gmsEnemy3DWork.obj_3d.mtn_cb_param = (object)truck_work; work.ppOut = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkTruckDispFunc); work.flag |= 1U; work.move_flag |= 128U; work.disp_flag |= 16777220U; work.disp_flag |= 16U; work.obj_3d.blend_spd = 0.125f; truck_work.trans_r.x = 0.0f; truck_work.trans_r.y = 0.0f; truck_work.trans_r.z = 4f / AppMain.FXM_FX32_TO_FLOAT(AppMain.g_obj.draw_scale.x); AppMain.nnMakeUnitMatrix(gmsEnemy3DWork.obj_3d.user_obj_mtx_r); AppMain.nnTranslateMatrix(gmsEnemy3DWork.obj_3d.user_obj_mtx_r, gmsEnemy3DWork.obj_3d.user_obj_mtx_r, truck_work.trans_r.x, truck_work.trans_r.y, truck_work.trans_r.z); AppMain.ObjObjectFieldRectSet(work, (short)AppMain.GMD_GMK_TRUCK_FIELD_RECT_LEFT, (short)AppMain.GMD_GMK_TRUCK_FIELD_RECT_TOP, (short)AppMain.GMD_GMK_TRUCK_FIELD_RECT_RIGHT, (short)AppMain.GMD_GMK_TRUCK_FIELD_RECT_BOTTOM); gmsEnemy3DWork.ene_com.rect_work[0].flag &= 4294967291U; gmsEnemy3DWork.ene_com.rect_work[1].flag &= 4294967291U; AppMain.OBS_RECT_WORK pRec = gmsEnemy3DWork.ene_com.rect_work[2]; pRec.ppDef = new AppMain.OBS_RECT_WORK_Delegate1(AppMain.gmGmkTruckBodyDefFunc); pRec.ppHit = (AppMain.OBS_RECT_WORK_Delegate1)null; AppMain.ObjRectAtkSet(pRec, (ushort)0, (short)0); AppMain.ObjRectWorkSet(pRec, (short)-64, (short)-64, (short)64, (short)64); AppMain.NNS_RGBA col = new AppMain.NNS_RGBA(1f, 1f, 1f, 1f); AppMain.NNS_VECTOR nnsVector = new AppMain.NNS_VECTOR(); nnsVector.x = -0.85f; nnsVector.y = -0.45f; nnsVector.z = -3.05f; AppMain.nnNormalizeVector(nnsVector, nnsVector); AppMain.ObjDrawSetParallelLight(AppMain.NNE_LIGHT_1, ref col, 1f, nnsVector); gmsEnemy3DWork.obj_3d.use_light_flag &= 4294967294U; truck_work.obj_3d_tire.use_light_flag &= 4294967294U; gmsEnemy3DWork.obj_3d.use_light_flag |= 2U; truck_work.obj_3d_tire.use_light_flag |= 2U; AppMain.gmGmkTruckCreateLightEfct(truck_work); gmsEnemy3DWork.ene_com.enemy_flag |= 65536U; work.obj_3d.command_state = 16U; return(work); }
// Token: 0x0600067D RID: 1661 RVA: 0x0003A62C File Offset: 0x0003882C public static void gmGmkTruckLightEfctMain(OBS_OBJECT_WORK obj_work) { if (obj_work.parent_obj == null) { obj_work.flag |= 4U; return; } AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)obj_work.parent_obj; obj_work.dir.z = ( ushort )(obj_work.parent_obj.dir.z + gms_GMK_TRUCK_WORK.slope_z_dir); if ((obj_work.disp_flag & 8U) != 0U) { obj_work.flag |= 4U; } }
// Token: 0x0600066B RID: 1643 RVA: 0x00038BA8 File Offset: 0x00036DA8 public static OBS_OBJECT_WORK GmGmkTruckInit(AppMain.GMS_EVE_RECORD_EVENT eve_rec, int pos_x, int pos_y, byte type) { OBS_OBJECT_WORK obs_OBJECT_WORK = AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y, () => new AppMain.GMS_GMK_TRUCK_WORK(), "GMK_TRUCK"); AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)obs_OBJECT_WORK; AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)obs_OBJECT_WORK; AppMain.mtTaskChangeTcbDestructor(obs_OBJECT_WORK.tcb, AppMain.gmGmkTruckDest); AppMain.ObjObjectCopyAction3dNNModel(obs_OBJECT_WORK, AppMain.gm_gmk_truck_obj_3d_list[0], gms_ENEMY_3D_WORK.obj_3d); AppMain.ObjObjectAction3dNNMotionLoad(obs_OBJECT_WORK, 0, true, AppMain.ObjDataGet(930), null, 0, null); AppMain.ObjDrawObjectActionSet(obs_OBJECT_WORK, 0); AppMain.ObjCopyAction3dNNModel(AppMain.gm_gmk_truck_obj_3d_list[1], gms_GMK_TRUCK_WORK.obj_3d_tire); gms_ENEMY_3D_WORK.obj_3d.mtn_cb_func = AppMain.gmGmkTruckMotionCallback; gms_ENEMY_3D_WORK.obj_3d.mtn_cb_param = gms_GMK_TRUCK_WORK; obs_OBJECT_WORK.ppOut = AppMain.gmGmkTruckDispFunc; obs_OBJECT_WORK.flag |= 1U; obs_OBJECT_WORK.move_flag |= 128U; obs_OBJECT_WORK.disp_flag |= 16777220U; obs_OBJECT_WORK.disp_flag |= 16U; obs_OBJECT_WORK.obj_3d.blend_spd = 0.125f; gms_GMK_TRUCK_WORK.trans_r.x = 0f; gms_GMK_TRUCK_WORK.trans_r.y = 0f; gms_GMK_TRUCK_WORK.trans_r.z = 4f / AppMain.FXM_FX32_TO_FLOAT(AppMain.g_obj.draw_scale.x); AppMain.nnMakeUnitMatrix(gms_ENEMY_3D_WORK.obj_3d.user_obj_mtx_r); AppMain.nnTranslateMatrix(gms_ENEMY_3D_WORK.obj_3d.user_obj_mtx_r, gms_ENEMY_3D_WORK.obj_3d.user_obj_mtx_r, gms_GMK_TRUCK_WORK.trans_r.x, gms_GMK_TRUCK_WORK.trans_r.y, gms_GMK_TRUCK_WORK.trans_r.z); AppMain.ObjObjectFieldRectSet(obs_OBJECT_WORK, ( short )AppMain.GMD_GMK_TRUCK_FIELD_RECT_LEFT, ( short )AppMain.GMD_GMK_TRUCK_FIELD_RECT_TOP, ( short )AppMain.GMD_GMK_TRUCK_FIELD_RECT_RIGHT, ( short )AppMain.GMD_GMK_TRUCK_FIELD_RECT_BOTTOM); gms_ENEMY_3D_WORK.ene_com.rect_work[0].flag &= 4294967291U; gms_ENEMY_3D_WORK.ene_com.rect_work[1].flag &= 4294967291U; AppMain.OBS_RECT_WORK obs_RECT_WORK = gms_ENEMY_3D_WORK.ene_com.rect_work[2]; obs_RECT_WORK.ppDef = AppMain.gmGmkTruckBodyDefFunc; obs_RECT_WORK.ppHit = null; AppMain.ObjRectAtkSet(obs_RECT_WORK, 0, 0); AppMain.ObjRectWorkSet(obs_RECT_WORK, -64, -64, 64, 64); NNS_RGBA nns_RGBA = new NNS_RGBA(1f, 1f, 1f, 1f); NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc(); nns_VECTOR.x = -0.85f; nns_VECTOR.y = -0.45f; nns_VECTOR.z = -3.05f; AppMain.nnNormalizeVector(nns_VECTOR, nns_VECTOR); AppMain.ObjDrawSetParallelLight(AppMain.NNE_LIGHT_1, ref nns_RGBA, 1f, nns_VECTOR); gms_ENEMY_3D_WORK.obj_3d.use_light_flag &= 4294967294U; gms_GMK_TRUCK_WORK.obj_3d_tire.use_light_flag &= 4294967294U; gms_ENEMY_3D_WORK.obj_3d.use_light_flag |= 2U; gms_GMK_TRUCK_WORK.obj_3d_tire.use_light_flag |= 2U; AppMain.gmGmkTruckCreateLightEfct(gms_GMK_TRUCK_WORK); gms_ENEMY_3D_WORK.ene_com.enemy_flag |= 65536U; obs_OBJECT_WORK.obj_3d.command_state = 16U; return(obs_OBJECT_WORK); }
// Token: 0x06000677 RID: 1655 RVA: 0x00039E28 File Offset: 0x00038028 public static void gmGmkTruckMotionCallback(AppMain.AMS_MOTION motion, AppMain.NNS_OBJECT _object, object param) { NNS_MATRIX nns_MATRIX = GlobalPool <NNS_MATRIX> .Alloc(); NNS_MATRIX nns_MATRIX2 = GlobalPool <NNS_MATRIX> .Alloc(); AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)param; AppMain.nnMakeUnitMatrix(nns_MATRIX2); AppMain.nnMultiplyMatrix(nns_MATRIX2, nns_MATRIX2, AppMain.amMatrixGetCurrent()); AppMain.nnCalcNodeMatrixTRSList(nns_MATRIX, _object, AppMain.GMD_GMK_TRUCK_NODE_ID_TIRE_POS_F, motion.data, nns_MATRIX2); gms_GMK_TRUCK_WORK.tire_pos_f.Assign(nns_MATRIX); AppMain.nnCalcNodeMatrixTRSList(nns_MATRIX, _object, AppMain.GMD_GMK_TRUCK_NODE_ID_TIRE_POS_B, motion.data, nns_MATRIX2); gms_GMK_TRUCK_WORK.tire_pos_b.Assign(nns_MATRIX); AppMain.nnCalcNodeMatrixTRSList(nns_MATRIX, _object, AppMain.GMD_GMK_TRUCK_NODE_ID_LIGHT_POS, motion.data, nns_MATRIX2); gms_GMK_TRUCK_WORK.light_pos.Assign(nns_MATRIX); }
public static void gmGmkTruckBodyDefFunc( AppMain.OBS_RECT_WORK mine_rect, AppMain.OBS_RECT_WORK match_rect) { AppMain.GMS_ENEMY_COM_WORK parentObj1 = (AppMain.GMS_ENEMY_COM_WORK)mine_rect.parent_obj; AppMain.GMS_PLAYER_WORK parentObj2 = (AppMain.GMS_PLAYER_WORK)match_rect.parent_obj; if (parentObj1 == null || parentObj2 == null || parentObj2.obj_work.obj_type != (ushort)1) { return; } AppMain.GMS_GMK_TRUCK_WORK gmsGmkTruckWork = (AppMain.GMS_GMK_TRUCK_WORK)parentObj1; parentObj1.obj_work.flag |= 16U; AppMain.GmPlayerSetTruckRide(parentObj2, parentObj1.obj_work, parentObj1.obj_work.field_rect[0], parentObj1.obj_work.field_rect[1], parentObj1.obj_work.field_rect[2], parentObj1.obj_work.field_rect[3]); gmsGmkTruckWork.target_player = parentObj2; AppMain.gmGmkTruckInitMain(parentObj1.obj_work, parentObj2); }
public static void gmGmkTruckLightEfctMain(AppMain.OBS_OBJECT_WORK obj_work) { if (obj_work.parent_obj == null) { obj_work.flag |= 4U; } else { AppMain.GMS_GMK_TRUCK_WORK parentObj = (AppMain.GMS_GMK_TRUCK_WORK)obj_work.parent_obj; obj_work.dir.z = (ushort)((uint)obj_work.parent_obj.dir.z + (uint)parentObj.slope_z_dir); if (((int)obj_work.disp_flag & 8) == 0) { return; } obj_work.flag |= 4U; } }
// Token: 0x06000681 RID: 1665 RVA: 0x0003A978 File Offset: 0x00038B78 public static void gmGmkTruckSparkEfctDispFunc(OBS_OBJECT_WORK obj_work) { AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)obj_work.parent_obj; NNS_MATRIX nns_MATRIX = (NNS_MATRIX)obj_work.user_work_OBJECT; NNS_VECTOR nns_VECTOR = GlobalPool <NNS_VECTOR> .Alloc(); if (obj_work.parent_obj == null) { GlobalPool <NNS_VECTOR> .Release(nns_VECTOR); return; } OBS_OBJECT_WORK obs_OBJECT_WORK = (OBS_OBJECT_WORK)gms_GMK_TRUCK_WORK.target_player; if (obs_OBJECT_WORK == null) { obs_OBJECT_WORK = ( OBS_OBJECT_WORK )gms_GMK_TRUCK_WORK; } AppMain.VecFx32 pos; pos.x = AppMain.FXM_FLOAT_TO_FX32(nns_MATRIX.M03); pos.y = AppMain.FXM_FLOAT_TO_FX32(-nns_MATRIX.M13); pos.z = AppMain.FXM_FLOAT_TO_FX32(nns_MATRIX.M23); ushort dir_z; ushort ang; if (obs_OBJECT_WORK.spd_m >= 0) { obj_work.disp_flag &= 4294967294U; dir_z = ( ushort )(8192 - obj_work.parent_obj.dir.z); ang = ( ushort )(-obj_work.parent_obj.dir.z - 2048); } else { obj_work.disp_flag |= 1U; dir_z = ( ushort )(8192 + obj_work.parent_obj.dir.z); ang = ( ushort )(obj_work.parent_obj.dir.z + 2048); } obj_work.pos = pos; nns_VECTOR.x = AppMain.nnSin(( int )ang) * AppMain.GMD_GMK_TRUCK_EFCT_SPRAK_OFST_DIST; nns_VECTOR.y = AppMain.nnCos(( int )ang) * AppMain.GMD_GMK_TRUCK_EFCT_SPRAK_OFST_DIST; nns_VECTOR.z = 0f; AppMain.GmComEfctSetDispOffsetF((AppMain.GMS_EFFECT_3DES_WORK)obj_work, nns_VECTOR.x, nns_VECTOR.y, nns_VECTOR.z); AppMain.GmComEfctSetDispRotation((AppMain.GMS_EFFECT_3DES_WORK)obj_work, 0, 0, dir_z); AppMain.ObjDrawActionSummary(obj_work); GlobalPool <NNS_VECTOR> .Release(nns_VECTOR); }
// Token: 0x06000671 RID: 1649 RVA: 0x0003980C File Offset: 0x00037A0C public static void gmGmkTruckInitFree(OBS_OBJECT_WORK obj_work, GMS_PLAYER_WORK ply_work) { AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)obj_work; gms_GMK_TRUCK_WORK.target_player = null; uint num; uint num2; if (ply_work != null) { obj_work.spd = ply_work.obj_work.spd; obj_work.spd_m = ply_work.obj_work.spd_m; num = ply_work.obj_work.flag; num2 = ply_work.obj_work.move_flag; } else { obj_work.spd.x = 0; obj_work.spd.y = 0; obj_work.spd.z = 0; num = 0U; num2 = 0U; } obj_work.flag &= 4294967294U; obj_work.flag |= (2U | (num & 1U)); obj_work.flag &= 4294967279U; obj_work.move_flag |= 192U; obj_work.move_flag &= 4294401791U; if ((num2 & 16U) != 0U) { obj_work.move_flag |= 16U; } else { if (obj_work.spd.x > obj_work.spd_m) { obj_work.spd_m = obj_work.spd.x; } obj_work.spd.x = 0; if (obj_work.obj_3d.act_id[0] != 0) { AppMain.ObjDrawObjectActionSet3DNNBlend(obj_work, 0); obj_work.disp_flag |= 4U; } } obj_work.ppFunc = AppMain.gmGmkTruckFreeMain; }
// Token: 0x06000676 RID: 1654 RVA: 0x00039D7C File Offset: 0x00037F7C public static void gmGmkTruckBodyDefFunc(AppMain.OBS_RECT_WORK mine_rect, AppMain.OBS_RECT_WORK match_rect) { AppMain.GMS_ENEMY_COM_WORK gms_ENEMY_COM_WORK = (AppMain.GMS_ENEMY_COM_WORK)mine_rect.parent_obj; AppMain.GMS_PLAYER_WORK gms_PLAYER_WORK = (AppMain.GMS_PLAYER_WORK)match_rect.parent_obj; if (gms_ENEMY_COM_WORK == null) { return; } if (gms_PLAYER_WORK == null || gms_PLAYER_WORK.obj_work.obj_type != 1) { return; } AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)gms_ENEMY_COM_WORK; gms_ENEMY_COM_WORK.obj_work.flag |= 16U; AppMain.GmPlayerSetTruckRide(gms_PLAYER_WORK, gms_ENEMY_COM_WORK.obj_work, gms_ENEMY_COM_WORK.obj_work.field_rect[0], gms_ENEMY_COM_WORK.obj_work.field_rect[1], gms_ENEMY_COM_WORK.obj_work.field_rect[2], gms_ENEMY_COM_WORK.obj_work.field_rect[3]); gms_GMK_TRUCK_WORK.target_player = gms_PLAYER_WORK; AppMain.gmGmkTruckInitMain(gms_ENEMY_COM_WORK.obj_work, gms_PLAYER_WORK); }
// Token: 0x06000675 RID: 1653 RVA: 0x00039C60 File Offset: 0x00037E60 public static void gmGmkTruckDispFunc(OBS_OBJECT_WORK obj_work) { AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)obj_work; AppMain.ObjDrawActionSummary(obj_work); AppMain.VecU16 dir = obj_work.dir; uint num = obj_work.disp_flag | 16777216U; AppMain.nnMakeRotateXYZMatrix(gms_GMK_TRUCK_WORK.obj_3d_tire.user_obj_mtx_r, ( int )gms_GMK_TRUCK_WORK.tire_dir, ( int )gms_GMK_TRUCK_WORK.slope_f_y_dir, ( int )gms_GMK_TRUCK_WORK.slope_f_z_dir); AppMain.VecFx32 vecFx; vecFx.x = AppMain.FXM_FLOAT_TO_FX32(gms_GMK_TRUCK_WORK.tire_pos_f.M03); vecFx.y = AppMain.FXM_FLOAT_TO_FX32(-gms_GMK_TRUCK_WORK.tire_pos_f.M13); vecFx.z = AppMain.FXM_FLOAT_TO_FX32(gms_GMK_TRUCK_WORK.tire_pos_f.M23); AppMain.ObjDrawAction3DNN(gms_GMK_TRUCK_WORK.obj_3d_tire, new AppMain.VecFx32?(vecFx), new AppMain.VecU16?(dir), obj_work.scale, ref num); vecFx.x = AppMain.FXM_FLOAT_TO_FX32(gms_GMK_TRUCK_WORK.tire_pos_b.M03); vecFx.y = AppMain.FXM_FLOAT_TO_FX32(-gms_GMK_TRUCK_WORK.tire_pos_b.M13); vecFx.z = AppMain.FXM_FLOAT_TO_FX32(gms_GMK_TRUCK_WORK.tire_pos_b.M23); AppMain.ObjDrawAction3DNN(gms_GMK_TRUCK_WORK.obj_3d_tire, new AppMain.VecFx32?(vecFx), new AppMain.VecU16?(dir), obj_work.scale, ref num); }
// Token: 0x06000680 RID: 1664 RVA: 0x0003A8A4 File Offset: 0x00038AA4 public static void gmGmkTruckSparkEfctMain(OBS_OBJECT_WORK obj_work) { AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)obj_work.parent_obj; if (obj_work.parent_obj == null) { obj_work.flag |= 4U; return; } OBS_OBJECT_WORK obs_OBJECT_WORK = (OBS_OBJECT_WORK)gms_GMK_TRUCK_WORK.target_player; if (obs_OBJECT_WORK == null) { obs_OBJECT_WORK = ( OBS_OBJECT_WORK )gms_GMK_TRUCK_WORK; } uint disp_flag = obj_work.disp_flag; if ((obs_OBJECT_WORK.move_flag & 1U) == 0U) { obj_work.disp_flag |= 32U; return; } obj_work.disp_flag &= 4294967263U; if (AppMain.MTM_MATH_ABS(obs_OBJECT_WORK.spd_m) < AppMain.GMD_GMK_TRUCK_SPARK_EFCT_SMALL_MIN_SPD) { if ((disp_flag & 32U) != 0U) { obj_work.flag |= 8U; } else { AppMain.ObjDrawKillAction3DES(obj_work); obj_work.ppFunc = AppMain.GmEffectDefaultMainFuncDeleteAtEnd; } if (obj_work.user_flag == 0U) { gms_GMK_TRUCK_WORK.efct_f_spark = null; } else { gms_GMK_TRUCK_WORK.efct_b_spark = null; } } AppMain.GmEffectDefaultMainFuncDeleteAtEnd(obj_work); }
public static void gmGmkTruckMotionCallback( AppMain.AMS_MOTION motion, AppMain.NNS_OBJECT _object, object param) { AppMain.NNS_MATRIX nnsMatrix1 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc(); AppMain.NNS_MATRIX nnsMatrix2 = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc(); AppMain.GMS_GMK_TRUCK_WORK gmsGmkTruckWork = (AppMain.GMS_GMK_TRUCK_WORK)param; AppMain.nnMakeUnitMatrix(nnsMatrix2); AppMain.nnMultiplyMatrix(nnsMatrix2, nnsMatrix2, AppMain.amMatrixGetCurrent()); AppMain.nnCalcNodeMatrixTRSList(nnsMatrix1, _object, AppMain.GMD_GMK_TRUCK_NODE_ID_TIRE_POS_F, (AppMain.ArrayPointer <AppMain.NNS_TRS>)motion.data, nnsMatrix2); gmsGmkTruckWork.tire_pos_f.Assign(nnsMatrix1); AppMain.nnCalcNodeMatrixTRSList(nnsMatrix1, _object, AppMain.GMD_GMK_TRUCK_NODE_ID_TIRE_POS_B, (AppMain.ArrayPointer <AppMain.NNS_TRS>)motion.data, nnsMatrix2); gmsGmkTruckWork.tire_pos_b.Assign(nnsMatrix1); AppMain.nnCalcNodeMatrixTRSList(nnsMatrix1, _object, AppMain.GMD_GMK_TRUCK_NODE_ID_LIGHT_POS, (AppMain.ArrayPointer <AppMain.NNS_TRS>)motion.data, nnsMatrix2); gmsGmkTruckWork.light_pos.Assign(nnsMatrix1); }
public static void gmGmkTruckSparkEfctMain(AppMain.OBS_OBJECT_WORK obj_work) { AppMain.GMS_GMK_TRUCK_WORK parentObj = (AppMain.GMS_GMK_TRUCK_WORK)obj_work.parent_obj; if (obj_work.parent_obj == null) { obj_work.flag |= 4U; } else { AppMain.OBS_OBJECT_WORK obsObjectWork = (AppMain.OBS_OBJECT_WORK)parentObj.target_player ?? (AppMain.OBS_OBJECT_WORK)parentObj; uint dispFlag = obj_work.disp_flag; if (((int)obsObjectWork.move_flag & 1) == 0) { obj_work.disp_flag |= 32U; } else { obj_work.disp_flag &= 4294967263U; if (AppMain.MTM_MATH_ABS(obsObjectWork.spd_m) < AppMain.GMD_GMK_TRUCK_SPARK_EFCT_SMALL_MIN_SPD) { if (((int)dispFlag & 32) != 0) { obj_work.flag |= 8U; } else { AppMain.ObjDrawKillAction3DES(obj_work); obj_work.ppFunc = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.GmEffectDefaultMainFuncDeleteAtEnd); } if (obj_work.user_flag == 0U) { parentObj.efct_f_spark = (AppMain.GMS_EFFECT_3DES_WORK)null; } else { parentObj.efct_b_spark = (AppMain.GMS_EFFECT_3DES_WORK)null; } } AppMain.GmEffectDefaultMainFuncDeleteAtEnd(obj_work); } } }
// Token: 0x06000672 RID: 1650 RVA: 0x00039960 File Offset: 0x00037B60 public static void gmGmkTruckFreeMain(OBS_OBJECT_WORK obj_work) { AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)obj_work; if ((obj_work.move_flag & 1U) != 0U && (obj_work.move_flag & 16U) != 0U) { if (obj_work.spd.x > obj_work.spd_m) { obj_work.spd_m = obj_work.spd.x; } obj_work.spd.x = 0; obj_work.move_flag &= 4294967279U; if (obj_work.obj_3d.act_id[0] != 0) { AppMain.ObjDrawObjectActionSet3DNNBlend(obj_work, 0); obj_work.disp_flag |= 4U; } GmSound.PlaySE("Lorry4"); } if ((obj_work.move_flag & 1U) != 0U) { obj_work.spd_m = AppMain.ObjSpdUpSet(obj_work.spd_m, 128, 40960); } else { obj_work.spd.x = AppMain.ObjSpdUpSet(obj_work.spd.x, 128, 40960); } if ((obj_work.move_flag & 1U) != 0U) { gms_GMK_TRUCK_WORK.tire_dir_spd = obj_work.spd_m; } else { gms_GMK_TRUCK_WORK.tire_dir_spd = AppMain.ObjSpdDownSet(gms_GMK_TRUCK_WORK.tire_dir_spd, 128); } AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK2 = gms_GMK_TRUCK_WORK; gms_GMK_TRUCK_WORK2.tire_dir += ( ushort )AppMain.FX_Div(gms_GMK_TRUCK_WORK.tire_dir_spd, 16384); if ((obj_work.move_flag & 1U) != 0U && AppMain.MTM_MATH_ABS(obj_work.spd_m) >= AppMain.GMD_GMK_TRUCK_SPARK_EFCT_SMALL_MIN_SPD && (gms_GMK_TRUCK_WORK.efct_f_spark == null || gms_GMK_TRUCK_WORK.efct_b_spark == null)) { AppMain.gmGmkTruckCreateSparkEfct(gms_GMK_TRUCK_WORK, 27); } AppMain.gmGmkTruckSetMoveSeParam(obj_work, gms_GMK_TRUCK_WORK.h_snd_lorry, null, 1); }
public static void gmGmkTruckSparkEfctDispFunc(AppMain.OBS_OBJECT_WORK obj_work) { AppMain.GMS_GMK_TRUCK_WORK parentObj = (AppMain.GMS_GMK_TRUCK_WORK)obj_work.parent_obj; AppMain.NNS_MATRIX userWorkObject = (AppMain.NNS_MATRIX)obj_work.user_work_OBJECT; AppMain.NNS_VECTOR nnsVector = new AppMain.NNS_VECTOR(); if (obj_work.parent_obj == null) { //AppMain.GlobalPool<AppMain.NNS_VECTOR>.Release(nnsVector); } else { AppMain.OBS_OBJECT_WORK obsObjectWork = (AppMain.OBS_OBJECT_WORK)parentObj.target_player ?? (AppMain.OBS_OBJECT_WORK)parentObj; AppMain.VecFx32 vecFx32; vecFx32.x = AppMain.FXM_FLOAT_TO_FX32(userWorkObject.M03); vecFx32.y = AppMain.FXM_FLOAT_TO_FX32(-userWorkObject.M13); vecFx32.z = AppMain.FXM_FLOAT_TO_FX32(userWorkObject.M23); ushort dir_z; ushort num; if (obsObjectWork.spd_m >= 0) { obj_work.disp_flag &= 4294967294U; dir_z = (ushort)(8192U - (uint)obj_work.parent_obj.dir.z); num = (ushort)((uint)-obj_work.parent_obj.dir.z - 2048U); } else { obj_work.disp_flag |= 1U; dir_z = (ushort)(8192U + (uint)obj_work.parent_obj.dir.z); num = (ushort)((uint)obj_work.parent_obj.dir.z + 2048U); } obj_work.pos = vecFx32; nnsVector.x = AppMain.nnSin((int)num) * AppMain.GMD_GMK_TRUCK_EFCT_SPRAK_OFST_DIST; nnsVector.y = AppMain.nnCos((int)num) * AppMain.GMD_GMK_TRUCK_EFCT_SPRAK_OFST_DIST; nnsVector.z = 0.0f; AppMain.GmComEfctSetDispOffsetF((AppMain.GMS_EFFECT_3DES_WORK)obj_work, nnsVector.x, nnsVector.y, nnsVector.z); AppMain.GmComEfctSetDispRotation((AppMain.GMS_EFFECT_3DES_WORK)obj_work, (ushort)0, (ushort)0, dir_z); AppMain.ObjDrawActionSummary(obj_work); //AppMain.GlobalPool<AppMain.NNS_VECTOR>.Release(nnsVector); } }
// Token: 0x0600067F RID: 1663 RVA: 0x0003A704 File Offset: 0x00038904 public static void gmGmkTruckCreateSparkEfct(AppMain.GMS_GMK_TRUCK_WORK truck_work, int efct_type) { if (truck_work.efct_f_spark == null) { truck_work.efct_f_spark = AppMain.GmEfctZoneEsCreate(( OBS_OBJECT_WORK )truck_work, 2, efct_type); truck_work.efct_f_spark.efct_com.obj_work.flag |= 524304U; truck_work.efct_f_spark.efct_com.obj_work.user_work_OBJECT = truck_work.tire_pos_f; truck_work.efct_f_spark.efct_com.obj_work.user_timer = efct_type; truck_work.efct_f_spark.efct_com.obj_work.user_flag = 0U; truck_work.efct_f_spark.efct_com.obj_work.ppFunc = AppMain.gmGmkTruckSparkEfctMain; truck_work.efct_f_spark.efct_com.obj_work.ppOut = AppMain.gmGmkTruckSparkEfctDispFunc; } if (truck_work.efct_b_spark == null) { truck_work.efct_b_spark = AppMain.GmEfctZoneEsCreate(( OBS_OBJECT_WORK )truck_work, 2, efct_type); truck_work.efct_b_spark.efct_com.obj_work.flag |= 524304U; truck_work.efct_b_spark.efct_com.obj_work.user_work_OBJECT = truck_work.tire_pos_b; truck_work.efct_b_spark.efct_com.obj_work.user_timer = efct_type; truck_work.efct_b_spark.efct_com.obj_work.user_flag = 1U; truck_work.efct_b_spark.efct_com.obj_work.ppFunc = AppMain.gmGmkTruckSparkEfctMain; truck_work.efct_b_spark.efct_com.obj_work.ppOut = AppMain.gmGmkTruckSparkEfctDispFunc; } }
public static void gmGmkTruckMain(AppMain.OBS_OBJECT_WORK obj_work) { AppMain.GMS_GMK_TRUCK_WORK truck_work = (AppMain.GMS_GMK_TRUCK_WORK)obj_work; AppMain.GMS_ENEMY_COM_WORK gmsEnemyComWork = (AppMain.GMS_ENEMY_COM_WORK)obj_work; if (truck_work.target_player == null) { AppMain.gmGmkTruckInitDeathFall(obj_work, (AppMain.GMS_PLAYER_WORK)null); obj_work.ppFunc(obj_work); } else if (((int)truck_work.target_player.player_flag & 262144) == 0) { AppMain.gmGmkTruckInitFree(obj_work, truck_work.target_player); obj_work.ppFunc(obj_work); } else if (((int)truck_work.target_player.gmk_flag2 & 64) != 0) { AppMain.gmGmkTruckInitDeathFall(obj_work, truck_work.target_player); obj_work.ppFunc(obj_work); } else { if (((int)truck_work.target_player.player_flag & 1024) != 0) { obj_work.pos.z = 983040; } AppMain.GMS_PLAYER_WORK targetPlayer = truck_work.target_player; obj_work.prev_pos = obj_work.pos; obj_work.pos.x = targetPlayer.obj_work.pos.x; obj_work.pos.y = targetPlayer.obj_work.pos.y; obj_work.move.x = obj_work.pos.x - obj_work.prev_pos.x; obj_work.move.y = obj_work.pos.y - obj_work.prev_pos.y; obj_work.move.z = obj_work.pos.z - obj_work.prev_pos.z; obj_work.dir = targetPlayer.obj_work.dir; obj_work.dir.z += targetPlayer.obj_work.dir_fall; obj_work.vib_timer = targetPlayer.obj_work.vib_timer; obj_work.disp_flag &= 4294967279U; truck_work.tire_dir_spd = ((int)targetPlayer.obj_work.move_flag & 1) == 0 ? AppMain.ObjSpdDownSet(truck_work.tire_dir_spd, 128) : targetPlayer.obj_work.spd_m; truck_work.tire_dir += (ushort)AppMain.FX_Div(truck_work.tire_dir_spd, 65536); int id = -1; uint num = 0; if (0 <= targetPlayer.act_state && targetPlayer.act_state <= 7 || (targetPlayer.act_state == 69 || targetPlayer.act_state == 70) || (targetPlayer.act_state == 74 || targetPlayer.act_state == 76 || targetPlayer.act_state == 75)) { id = 3; num = 4U; } else if (71 <= targetPlayer.act_state && targetPlayer.act_state <= 72) { id = 0; num = 4U; } else if (((int)targetPlayer.obj_work.move_flag & 1) == 0) { id = 1; num = 4U; } else if (((int)targetPlayer.obj_work.move_flag & 1) != 0 && ((int)targetPlayer.obj_work.move_flag & 4194304) == 0) { id = 2; } else if (obj_work.obj_3d.act_id[0] == 2 && ((int)obj_work.disp_flag & 8) != 0) { id = targetPlayer.obj_work.spd_m == 0 ? 3 : 0; num = 4U; } else if (11 <= targetPlayer.act_state && targetPlayer.act_state <= 16 && (obj_work.obj_3d.act_id[0] != 2 || ((int)obj_work.disp_flag & 8) != 0)) { id = 3; num = 4U; } if (id != -1 && obj_work.obj_3d.act_id[0] != id) { AppMain.ObjDrawObjectActionSet3DNNBlend(obj_work, id); obj_work.disp_flag |= num; } if (obj_work.obj_3d.act_id[0] != 3 && (11 > targetPlayer.act_state || targetPlayer.act_state > 16 || obj_work.obj_3d.act_id[0] != 2)) { obj_work.obj_3d.frame[0] = targetPlayer.obj_work.obj_3d.frame[0]; } truck_work.slope_f_y_dir = (ushort)0; truck_work.slope_f_z_dir = (ushort)0; truck_work.slope_z_dir = (ushort)0; float x; float y; float z; if (((int)targetPlayer.player_flag & 4) == 0) { x = 0.0f; y = 8f; z = -5f; } else { x = 0.0f; y = 8f; z = 5f; } AppMain.nnMakeUnitMatrix(obj_work.obj_3d.user_obj_mtx_r); AppMain.nnTranslateMatrix(obj_work.obj_3d.user_obj_mtx_r, obj_work.obj_3d.user_obj_mtx_r, truck_work.trans_r.x, truck_work.trans_r.y, truck_work.trans_r.z); if (((int)targetPlayer.gmk_flag & 262144) != 0 && targetPlayer.gmk_work3 != 0) { AppMain.NNS_MATRIX nnsMatrix = AppMain.GlobalPool <AppMain.NNS_MATRIX> .Alloc(); truck_work.slope_z_dir = (ushort)targetPlayer.gmk_work3; truck_work.slope_f_z_dir = (ushort)(AppMain.MTM_MATH_ABS(targetPlayer.gmk_work3) >> 2); truck_work.slope_f_y_dir = (ushort)(targetPlayer.gmk_work3 >> 2); AppMain.nnMakeUnitMatrix(nnsMatrix); AppMain.nnTranslateMatrix(nnsMatrix, nnsMatrix, -x, -y, -z); AppMain.nnRotateXMatrix(nnsMatrix, nnsMatrix, (int)truck_work.slope_z_dir); AppMain.nnRotateYMatrix(nnsMatrix, nnsMatrix, (int)truck_work.slope_f_y_dir); AppMain.nnRotateZMatrix(nnsMatrix, nnsMatrix, (int)truck_work.slope_f_z_dir); AppMain.nnTranslateMatrix(nnsMatrix, nnsMatrix, x, y, z); AppMain.nnMultiplyMatrix(obj_work.obj_3d.user_obj_mtx_r, obj_work.obj_3d.user_obj_mtx_r, nnsMatrix); AppMain.GlobalPool <AppMain.NNS_MATRIX> .Release(nnsMatrix); } if (((int)targetPlayer.obj_work.move_flag & 1) != 0 && AppMain.MTM_MATH_ABS(targetPlayer.obj_work.spd_m) >= AppMain.GMD_GMK_TRUCK_SPARK_EFCT_SMALL_MIN_SPD && (truck_work.efct_f_spark == null || truck_work.efct_b_spark == null)) { AppMain.gmGmkTruckCreateSparkEfct(truck_work, 27); } if (truck_work.h_snd_lorry.au_player.sound == null || truck_work.h_snd_lorry.au_player.sound[0] == null) { truck_work.h_snd_lorry = AppMain.GsSoundAllocSeHandle(); truck_work.h_snd_lorry.au_player.SetAisac("Speed", 0.0f); AppMain.GmSoundPlaySEForce("Lorry", truck_work.h_snd_lorry, true); } AppMain.gmGmkTruckSetMoveSeParam(obj_work, truck_work.h_snd_lorry, targetPlayer, ((int)targetPlayer.player_flag & 16777216) != 0 ? 1 : 0); } }
// Token: 0x06000670 RID: 1648 RVA: 0x00039260 File Offset: 0x00037460 public static void gmGmkTruckMain(OBS_OBJECT_WORK obj_work) { AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK = (AppMain.GMS_GMK_TRUCK_WORK)obj_work; if (gms_GMK_TRUCK_WORK.target_player == null) { AppMain.gmGmkTruckInitDeathFall(obj_work, null); obj_work.ppFunc(obj_work); return; } if ((gms_GMK_TRUCK_WORK.target_player.player_flag & 262144U) == 0U) { AppMain.gmGmkTruckInitFree(obj_work, gms_GMK_TRUCK_WORK.target_player); obj_work.ppFunc(obj_work); return; } if ((gms_GMK_TRUCK_WORK.target_player.gmk_flag2 & 64U) != 0U) { AppMain.gmGmkTruckInitDeathFall(obj_work, gms_GMK_TRUCK_WORK.target_player); obj_work.ppFunc(obj_work); return; } if ((gms_GMK_TRUCK_WORK.target_player.player_flag & 1024U) != 0U) { obj_work.pos.z = 983040; } GMS_PLAYER_WORK target_player = gms_GMK_TRUCK_WORK.target_player; obj_work.prev_pos = obj_work.pos; obj_work.pos.x = target_player.obj_work.pos.x; obj_work.pos.y = target_player.obj_work.pos.y; obj_work.move.x = obj_work.pos.x - obj_work.prev_pos.x; obj_work.move.y = obj_work.pos.y - obj_work.prev_pos.y; obj_work.move.z = obj_work.pos.z - obj_work.prev_pos.z; obj_work.dir = target_player.obj_work.dir; obj_work.dir.z = ( ushort )(obj_work.dir.z + target_player.obj_work.dir_fall); obj_work.vib_timer = target_player.obj_work.vib_timer; obj_work.disp_flag &= 4294967279U; if ((target_player.obj_work.move_flag & 1U) != 0U) { gms_GMK_TRUCK_WORK.tire_dir_spd = target_player.obj_work.spd_m; } else { gms_GMK_TRUCK_WORK.tire_dir_spd = AppMain.ObjSpdDownSet(gms_GMK_TRUCK_WORK.tire_dir_spd, 128); } AppMain.GMS_GMK_TRUCK_WORK gms_GMK_TRUCK_WORK2 = gms_GMK_TRUCK_WORK; gms_GMK_TRUCK_WORK2.tire_dir += ( ushort )AppMain.FX_Div(gms_GMK_TRUCK_WORK.tire_dir_spd, 65536); int num = -1; uint num2 = 0U; if ((0 <= target_player.act_state && target_player.act_state <= 7) || target_player.act_state == 69 || target_player.act_state == 70 || target_player.act_state == 74 || target_player.act_state == 76 || target_player.act_state == 75) { num = 3; num2 = 4U; } else if (71 <= target_player.act_state && target_player.act_state <= 72) { num = 0; num2 = 4U; } else if ((target_player.obj_work.move_flag & 1U) == 0U) { num = 1; num2 = 4U; } else if ((target_player.obj_work.move_flag & 1U) != 0U && (target_player.obj_work.move_flag & 4194304U) == 0U) { num = 2; } else if (obj_work.obj_3d.act_id[0] == 2 && (obj_work.disp_flag & 8U) != 0U) { if (target_player.obj_work.spd_m != 0) { num = 0; } else { num = 3; } num2 = 4U; } else if (11 <= target_player.act_state && target_player.act_state <= 16 && (obj_work.obj_3d.act_id[0] != 2 || (obj_work.disp_flag & 8U) != 0U)) { num = 3; num2 = 4U; } if (num != -1 && obj_work.obj_3d.act_id[0] != num) { AppMain.ObjDrawObjectActionSet3DNNBlend(obj_work, num); obj_work.disp_flag |= num2; } if (obj_work.obj_3d.act_id[0] != 3 && (11 > target_player.act_state || target_player.act_state > 16 || obj_work.obj_3d.act_id[0] != 2)) { obj_work.obj_3d.frame[0] = target_player.obj_work.obj_3d.frame[0]; } gms_GMK_TRUCK_WORK.slope_f_y_dir = 0; gms_GMK_TRUCK_WORK.slope_f_z_dir = 0; gms_GMK_TRUCK_WORK.slope_z_dir = 0; float num3; float num4; float num5; if ((target_player.player_flag & 4U) == 0U) { num3 = 0f; num4 = 8f; num5 = -5f; } else { num3 = 0f; num4 = 8f; num5 = 5f; } AppMain.nnMakeUnitMatrix(obj_work.obj_3d.user_obj_mtx_r); AppMain.nnTranslateMatrix(obj_work.obj_3d.user_obj_mtx_r, obj_work.obj_3d.user_obj_mtx_r, gms_GMK_TRUCK_WORK.trans_r.x, gms_GMK_TRUCK_WORK.trans_r.y, gms_GMK_TRUCK_WORK.trans_r.z); if ((target_player.gmk_flag & 262144U) != 0U && target_player.gmk_work3 != 0) { NNS_MATRIX nns_MATRIX = GlobalPool <NNS_MATRIX> .Alloc(); gms_GMK_TRUCK_WORK.slope_z_dir = ( ushort )target_player.gmk_work3; gms_GMK_TRUCK_WORK.slope_f_z_dir = ( ushort )(AppMain.MTM_MATH_ABS(target_player.gmk_work3) >> 2); gms_GMK_TRUCK_WORK.slope_f_y_dir = ( ushort )(target_player.gmk_work3 >> 2); AppMain.nnMakeUnitMatrix(nns_MATRIX); AppMain.nnTranslateMatrix(nns_MATRIX, nns_MATRIX, -num3, -num4, -num5); AppMain.nnRotateXMatrix(nns_MATRIX, nns_MATRIX, ( int )gms_GMK_TRUCK_WORK.slope_z_dir); AppMain.nnRotateYMatrix(nns_MATRIX, nns_MATRIX, ( int )gms_GMK_TRUCK_WORK.slope_f_y_dir); AppMain.nnRotateZMatrix(nns_MATRIX, nns_MATRIX, ( int )gms_GMK_TRUCK_WORK.slope_f_z_dir); AppMain.nnTranslateMatrix(nns_MATRIX, nns_MATRIX, num3, num4, num5); AppMain.nnMultiplyMatrix(obj_work.obj_3d.user_obj_mtx_r, obj_work.obj_3d.user_obj_mtx_r, nns_MATRIX); GlobalPool <NNS_MATRIX> .Release(nns_MATRIX); } if ((target_player.obj_work.move_flag & 1U) != 0U && AppMain.MTM_MATH_ABS(target_player.obj_work.spd_m) >= AppMain.GMD_GMK_TRUCK_SPARK_EFCT_SMALL_MIN_SPD && (gms_GMK_TRUCK_WORK.efct_f_spark == null || gms_GMK_TRUCK_WORK.efct_b_spark == null)) { AppMain.gmGmkTruckCreateSparkEfct(gms_GMK_TRUCK_WORK, 27); } if (gms_GMK_TRUCK_WORK.h_snd_lorry.au_player.sound == null || gms_GMK_TRUCK_WORK.h_snd_lorry.au_player.sound[0] == null) { gms_GMK_TRUCK_WORK.h_snd_lorry = GsSound.AllocSeHandle(); gms_GMK_TRUCK_WORK.h_snd_lorry.au_player.SetAisac("Speed", 0f); GmSound.PlaySEForce("Lorry", gms_GMK_TRUCK_WORK.h_snd_lorry, true); } AppMain.gmGmkTruckSetMoveSeParam(obj_work, gms_GMK_TRUCK_WORK.h_snd_lorry, target_player, ((target_player.player_flag & 16777216U) != 0U) ? 1 : 0); }