- Fixed: Pain flashes were not inheritable.
SVN r3779 (trunk)
This commit is contained in:
parent
5c7e04c539
commit
d2843c199e
3 changed files with 28 additions and 8 deletions
26
src/info.cpp
26
src/info.cpp
|
|
@ -329,6 +329,32 @@ void FActorInfo::SetPainFlash(FName type, PalEntry color)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
bool FActorInfo::GetPainFlash(FName type, PalEntry *color) const
|
||||
{
|
||||
const FActorInfo *info = this;
|
||||
|
||||
while (info != NULL)
|
||||
{
|
||||
if (info->PainFlashes != NULL)
|
||||
{
|
||||
PalEntry *flash = info->PainFlashes->CheckKey(type);
|
||||
if (flash != NULL)
|
||||
{
|
||||
*color = *flash;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// Try parent class
|
||||
info = info->Class->ParentClass->ActorInfo;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void FActorInfo::SetColorSet(int index, const FPlayerColorSet *set)
|
||||
{
|
||||
if (set != NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue