Fix build

This commit is contained in:
Henrique Gemignani Passos Lima 2022-11-11 11:49:13 +02:00
parent 4c235504e9
commit 816451423a
No known key found for this signature in database
GPG Key ID: E224F951761145F8
5 changed files with 16 additions and 14 deletions

View File

@ -56,7 +56,7 @@ void CMetaree::CollidedWith(const TUniqueId& id, const CCollisionInfoList& colLi
CStateManager& mgr) { CStateManager& mgr) {
if (IsAlive() && colList.GetCount() > 0) { if (IsAlive() && colList.GetCount() > 0) {
mgr.ApplyDamageToWorld(GetUniqueId(), *this, GetTranslation(), x5ac_damageInfo, mgr.ApplyDamageToWorld(GetUniqueId(), *this, GetTranslation(), x5ac_damageInfo,
CMaterialFilter::MakeInclude(kMT_Player)); CMaterialFilter::MakeInclude(CMaterialList(kMT_Player)));
SendScriptMsgs(kSS_Arrived, mgr, kSM_None); SendScriptMsgs(kSS_Arrived, mgr, kSM_None);
MassiveDeath(mgr); MassiveDeath(mgr);
} }

View File

@ -122,7 +122,7 @@ CVector3f CNewIntroBoss::PlayerPos(const CStateManager& mgr) const {
float z0 = mgr.GetPlayer()->GetEyeHeight() / 2.f; float z0 = mgr.GetPlayer()->GetEyeHeight() / 2.f;
CVector3f pos = mgr.GetPlayer()->GetTranslation() + CVector3f(0.f, 0.f, z0); CVector3f pos = mgr.GetPlayer()->GetTranslation() + CVector3f(0.f, 0.f, z0);
CRayCastResult result = CGameCollision::RayStaticIntersection( CRayCastResult result = CGameCollision::RayStaticIntersection(
mgr, pos, CVector3f::Down(), 30.f, CMaterialFilter::MakeInclude(kMT_Solid)); mgr, pos, CVector3f::Down(), 30.f, CMaterialFilter::MakeInclude(CMaterialList(kMT_Solid)));
if (result.IsInvalid()) { if (result.IsInvalid()) {
float z = mgr.GetPlayer()->GetEyeHeight() / 2.f + 0.2f; float z = mgr.GetPlayer()->GetEyeHeight() / 2.f + 0.2f;
return mgr.GetPlayer()->GetTranslation() + CVector3f(0.f, 0.f, z); return mgr.GetPlayer()->GetTranslation() + CVector3f(0.f, 0.f, z);

View File

@ -54,7 +54,8 @@ void CPuffer::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateMan
switch (msg) { switch (msg) {
case kSM_Registered: case kSM_Registered:
GetBodyCtrl()->Activate(mgr); GetBodyCtrl()->Activate(mgr);
SetMaterialFilter(CMaterialFilter::MakeIncludeExclude(kMT_Player, kMT_NoStaticCollision)); SetMaterialFilter(CMaterialFilter::MakeIncludeExclude(CMaterialList(kMT_Player),
CMaterialList(kMT_NoStaticCollision)));
break; break;
case kSM_Action: case kSM_Action:
if (GetActive()) { if (GetActive()) {

View File

@ -626,8 +626,7 @@ void CScriptSpecialFunction::RingScramble(CStateManager& mgr) {
x1b8_ringReverse = !x1b8_ringReverse; x1b8_ringReverse = !x1b8_ringReverse;
float dir = x1b8_ringReverse ? 1.f : -1.f; float dir = x1b8_ringReverse ? 1.f : -1.f;
for (int i = 0; i < x198_ringControllers.size(); ++i) { for (int i = 0; i < x198_ringControllers.size(); ++i) {
x198_ringControllers[i].x4_rotateSpeed = x198_ringControllers[i].x4_rotateSpeed = dir * mgr.Random()->Range(x100_float2, x104_float3);
dir * mgr.Random()->Range(x100_float2, x104_float3);
dir = -dir; dir = -dir;
x198_ringControllers[i].x8_reachedTarget = false; x198_ringControllers[i].x8_reachedTarget = false;
} }
@ -988,7 +987,8 @@ void CScriptSpecialFunction::ThinkChaffTarget(float dt, CStateManager& mgr) {
TEntityList nearList; TEntityList nearList;
const CVector3f offset(5.f, 5.f, 5.f); const CVector3f offset(5.f, 5.f, 5.f);
const CAABox box(GetTranslation() - offset, GetTranslation() + offset); const CAABox box(GetTranslation() - offset, GetTranslation() + offset);
mgr.BuildNearList(nearList, box, CMaterialFilter::MakeInclude(kMT_Projectile), nullptr); mgr.BuildNearList(nearList, box, CMaterialFilter::MakeInclude(CMaterialList(kMT_Projectile)),
nullptr);
for (int i = 0; i < nearList.size(); ++i) { for (int i = 0; i < nearList.size(); ++i) {
if (CEnergyProjectile* proj = TCastToPtr< CEnergyProjectile >(mgr.ObjectById(nearList[i]))) { if (CEnergyProjectile* proj = TCastToPtr< CEnergyProjectile >(mgr.ObjectById(nearList[i]))) {

View File

@ -107,9 +107,10 @@ void CScriptTrigger::Touch(CActor& act, CStateManager& mgr) {
mgr.SendScriptMsg(GetUniqueId(), mgr.GetEditorIdForUniqueId(GetUniqueId()), mgr.SendScriptMsg(GetUniqueId(), mgr.GetEditorIdForUniqueId(GetUniqueId()),
kSM_Deactivate, kSS_Entered); kSM_Deactivate, kSS_Entered);
if (act.HealthInfo(mgr) && x100_damageInfo.GetDamage() > 0.f) { if (act.HealthInfo(mgr) && x100_damageInfo.GetDamage() > 0.f) {
mgr.ApplyDamage(GetUniqueId(), act.GetUniqueId(), GetUniqueId(), x100_damageInfo, mgr.ApplyDamage(
CMaterialFilter::MakeIncludeExclude(SolidMaterial, CMaterialList(0)), GetUniqueId(), act.GetUniqueId(), GetUniqueId(), x100_damageInfo,
CVector3f::Zero()); CMaterialFilter::MakeIncludeExclude(CMaterialList(SolidMaterial), CMaterialList(0)),
CVector3f::Zero());
} }
} }
@ -119,9 +120,10 @@ void CScriptTrigger::Touch(CActor& act, CStateManager& mgr) {
static CWeaponMode sktonOHurtWeaponMode(kWT_Power, false, false, true); static CWeaponMode sktonOHurtWeaponMode(kWT_Power, false, false, true);
CDamageInfo dmg(sktonOHurtWeaponMode, 10.f * hInfo->GetHP(), 0.f, 0.f); CDamageInfo dmg(sktonOHurtWeaponMode, 10.f * hInfo->GetHP(), 0.f, 0.f);
mgr.ApplyDamage(GetUniqueId(), act.GetUniqueId(), GetUniqueId(), dmg, mgr.ApplyDamage(
CMaterialFilter::MakeIncludeExclude(SolidMaterial, CMaterialList(0)), GetUniqueId(), act.GetUniqueId(), GetUniqueId(), dmg,
CVector3f::Zero()); CMaterialFilter::MakeIncludeExclude(CMaterialList(SolidMaterial), CMaterialList(0)),
CVector3f::Zero());
} }
} }
} else { } else {
@ -143,8 +145,7 @@ rstl::optional_object< CAABox > CScriptTrigger::GetTouchBounds() const {
return rstl::optional_object_null(); return rstl::optional_object_null();
} }
void CScriptTrigger::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, void CScriptTrigger::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager& mgr) {
CStateManager& mgr) {
if (GetActive()) { if (GetActive()) {
if (msg == kSM_Deactivate) { if (msg == kSM_Deactivate) {
xe8_inhabitants.clear(); xe8_inhabitants.clear();