mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-02 02:01:31 +00:00
- backend update from GZDoom.
Mainly quaternion math and sound system cleanup.
This commit is contained in:
parent
f1bfaac301
commit
2ffdf3d0e1
25 changed files with 919 additions and 259 deletions
|
@ -1332,9 +1332,9 @@ FSerializer &Serialize(FSerializer &arc, const char *key, FSoundID &sid, FSoundI
|
|||
if (!arc.soundNamesAreUnique)
|
||||
{
|
||||
//If sound name here is not reliable, we need to save by index instead.
|
||||
int id = sid;
|
||||
int id = sid.index();
|
||||
Serialize(arc, key, id, nullptr);
|
||||
if (arc.isReading()) sid = FSoundID(id);
|
||||
if (arc.isReading()) sid = FSoundID::fromInt(id);
|
||||
}
|
||||
else if (arc.isWriting())
|
||||
{
|
||||
|
@ -1354,16 +1354,16 @@ FSerializer &Serialize(FSerializer &arc, const char *key, FSoundID &sid, FSoundI
|
|||
assert(val->IsString() || val->IsNull());
|
||||
if (val->IsString())
|
||||
{
|
||||
sid = UnicodeToString(val->GetString());
|
||||
sid = S_FindSound(UnicodeToString(val->GetString()));
|
||||
}
|
||||
else if (val->IsNull())
|
||||
{
|
||||
sid = 0;
|
||||
sid = NO_SOUND;
|
||||
}
|
||||
else
|
||||
{
|
||||
Printf(TEXTCOLOR_RED "string type expected for '%s'\n", key);
|
||||
sid = 0;
|
||||
sid = NO_SOUND;
|
||||
arc.mErrors++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue