mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
Fix character spawning at saved position instead of default preset
selectSpawnPreset() was always returning a preset (Goldshire by default), overriding the saved character position. Now returns nullptr when no WOW_SPAWN env var is set, allowing saved position to be used.
This commit is contained in:
parent
8cb38b91f9
commit
3e50b1071d
1 changed files with 2 additions and 1 deletions
|
|
@ -48,8 +48,9 @@ namespace core {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const SpawnPreset* selectSpawnPreset(const char* envValue) {
|
const SpawnPreset* selectSpawnPreset(const char* envValue) {
|
||||||
|
// Return nullptr if no preset specified - use saved character position
|
||||||
if (!envValue || !*envValue) {
|
if (!envValue || !*envValue) {
|
||||||
return &SPAWN_PRESETS[0];
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string key = envValue;
|
std::string key = envValue;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue