Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

From database update #3

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions examples/EnableRipperModeOnBladeMode/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class OnBladeModeRipper

if (player)
{
if (player->IsBladeModeActive()) // Raiden only
if (player->isBladeModeActive()) // Raiden only
if (!player->m_nRipperModeEnabled)
player->EnableRipperMode();
player->enableRipperMode();
}
};
}
Expand Down
9 changes: 6 additions & 3 deletions examples/EntitySpawner/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class Spawner
auto pos = cGameUIManager::Instance.m_pPlayer ? cGameUIManager::Instance.m_pPlayer->m_vecTransPos : cVec4();
auto rot = cGameUIManager::Instance.m_pPlayer ? cGameUIManager::Instance.m_pPlayer->m_vecRotation : cVec4();

instance->place(&pos, &rot);
instance->place(pos, rot);

cObjReadManager::Instance.endWork(instance->m_nObjId, instance->m_nSetType);
}
Expand All @@ -141,8 +141,11 @@ class Spawner

Events::OnTickEvent += []()
{
if (shared::IsKeyPressedEx('H', false)) // spawn boss Sam for example
m_EntQueue.push_back({ .mObjId = (eObjID)0x20020, .iSetType = 0, .bWorkFail = !isObjExists(.mObjId) });
if (shared::IsKeyPressed('H', false)) // spawn boss Sam for example
{
eObjID objectId = eObjID(0x20020);
m_EntQueue.push_back({ .mObjId = objectId, .iSetType = 0, .bWorkFail = !isObjExists(objectId) });
}
};
}
} __spawner;
2 changes: 1 addition & 1 deletion examples/MagicButton/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Plugin

auto enemy = entity->getEntityInstance<BehaviorEmBase>();

if (enemy->getContext()->hasInheritance(BehaviorEmBase::Context))
if (enemy->getContext().hasInheritance(BehaviorEmBase::ms_Context))
{
enemy->m_vecTransPos.y = -1000.0f;
enemy->place(enemy->m_vecTransPos, enemy->m_vecRotation);
Expand Down
6 changes: 3 additions & 3 deletions examples/PlayerAdrenaline/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ class PlayerAdrenaline
Pl0000 *player = cGameUIManager::Instance.m_pPlayer;
static bool once = false;

if (player->m_nHealth / player->GetMaxHealth() <= 0.4f)
if (player->m_nHealth / player->getMaxHealth() <= 0.4f)
{
Trigger::GameFlags.GAME_MUGEN_ZANGEKI = true;
player->EnableRipperMode();
player->enableRipperMode();

SlowRateManager->SetSlowRate(SLOWRATE_GLOBAL, 0.6);
SlowRateManager->SetSlowRate(SLOWRATE_PL, 1.66667);
SlowRateManager->SetSlowRate(SLOWRATE_EM, 0.6);

once = false;
}
else if (player->m_nHealth / player->GetMaxHealth() > 0.4f && !once)
else if (player->m_nHealth / player->getMaxHealth() > 0.4f && !once)
{
Trigger::GameFlags.GAME_MUGEN_ZANGEKI = false;

Expand Down
2 changes: 1 addition & 1 deletion examples/RenderTextD3D/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class RenderTextD3DX9
{
Events::OnGameStartupEvent += []()
{
if (D3DXCreateFont(Hw::GraphicDevice, 17, 0, FW_BOLD, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &font) == S_OK)
if (D3DXCreateFontA(Hw::GraphicDevice, 17, 0, FW_BOLD, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &font) == S_OK)
canRender = true;
};
Events::OnEndScene += []()
Expand Down
10 changes: 7 additions & 3 deletions game/AnimFlagObj.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include "BehaviorBa.h"
#include "shared.h"
#include <BehaviorBa.h>
#include <shared.h>

class AnimFlagObj : public BehaviorBa
{
Expand All @@ -11,4 +11,8 @@ class AnimFlagObj : public BehaviorBa
{
((void (__thiscall *)(AnimFlagObj *))(shared::base + 0x6B05A0))(this);
}
};

static inline ContextInstance& ms_Context = *(ContextInstance*)(shared::base + 0x1734B44);
};

VALIDATE_SIZE(AnimFlagObj, 0xB30);
Loading