Ports verified against 12340 that take the x64 client from character login to a playable world: - Camera: SetView/ResetView, motion, free-look facing, tracking, bobs, liquid bump, world collision; camera Lua scripts - Input: world frame key/mouse layers, default action, mouselook, turn/pitch player, TurnOrAction/CameraOrSelectOrMove scripts - Movement: legal facing range, turn/pitch/raw facing events, transport status, move spline copy, unit update info, smooth facing, anim end - Units: component and extended display init, model fade/scale, entity sort table, RenderEntitys, split-body culling - Interiors: WMO group bounds, BSP segment link query, face linking, interior lighting - Collision: CMap::QueryFacets closure with frustum queries and NDCClip - UI: game UI mouse filters, client control state, faction standing packet, many *_Scripts.cpp Lua tables; name generator dictionary fix Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
47 lines
1.5 KiB
C++
47 lines
1.5 KiB
C++
#include "ViolenceLevels.h"
|
|
#include "Engine/Source/ConsoleBase/ConsoleVar.h"
|
|
#include "Engine/Source/ConsoleBase/Types.h"
|
|
#include "Engine/Source/Services/Texture.h"
|
|
#include "Engine/Source/Storm/H/storm.h"
|
|
#include "WoW/Source/Client.h"
|
|
|
|
// STATIC: 0x00AF4E14
|
|
static int32_t s_maxViolenceLevel[9] = { 2, 1, 2, 2, 1, 2, 2, 2, 2 };
|
|
|
|
// STATIC: 0x00AF4E38
|
|
static const char* s_bloodSpurtTextures[2] = { "BloodSpurtSmall01_Low.blp", "BloodSpurtSmall01_Medium.blp" };
|
|
|
|
// STATIC: 0x00AF4E40
|
|
static const char* s_bloodSpurtTexture = "BloodSpurtSmall01.blp";
|
|
|
|
// STATIC: 0x00D3920C
|
|
int32_t s_violenceLevel;
|
|
|
|
// VERIFY: 0375dcf4 manual
|
|
// OFFSET: 0x007F39B0
|
|
bool ViolenceLevelChanged(CVar* var, const char* oldValue, const char* value, void* arg) {
|
|
int32_t level = SStrToInt(value);
|
|
s_violenceLevel = level;
|
|
|
|
if (level < 0 || level > s_maxViolenceLevel[s_locale]) {
|
|
level = s_maxViolenceLevel[s_locale];
|
|
s_violenceLevel = level;
|
|
}
|
|
|
|
if (level == 2) {
|
|
TextureSetTextureSubstitutions(nullptr, nullptr);
|
|
} else {
|
|
TextureSetTextureSubstitutions(s_bloodSpurtTexture, s_bloodSpurtTextures[level]);
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
// VERIFY: 07f0f122 auto
|
|
// OFFSET: 0x007F3A10
|
|
void ViolenceLevelsRegisterCVars() {
|
|
char value[12];
|
|
SStrPrintf(value, sizeof(value), "%d", s_maxViolenceLevel[s_locale]);
|
|
CVar::Register("violenceLevel", "Sets the violence level of the game", 0x10, value, ViolenceLevelChanged, CATEGORY_GAME, false, nullptr, false);
|
|
}
|