Add force generate laughing man function and use it for Magic Kitty

This commit is contained in:
DenialMC 2015-04-04 11:26:39 +03:00
parent 99c29e64a4
commit edbd2d0584
2 changed files with 3 additions and 5 deletions

View file

@ -10,7 +10,6 @@ import MovieCamera
import MovieUtil
from toontown.chat.ChatGlobals import *
from toontown.nametag.NametagGlobals import *
from toontown.toon import LaughingManGlobals
from toontown.toon import NPCToons
from toontown.toonbase import TTLocalizer
from toontown.toonbase import ToontownBattleGlobals
@ -93,8 +92,7 @@ def __getSoundTrack(level, delay, duration = None, node = None):
def teleportIn(attack, npc, pos = Point3(0, 0, 0), hpr = Vec3(180.0, 0.0, 0.0)):
if npc.getName() == 'Magic Cat':
LaughingManGlobals.addToonEffect(npc)
npc.nametag3d.hide()
npc.generateLaughingMan(True)
a = Func(npc.reparentTo, attack['battle'])
b = Func(npc.setPos, pos)
c = Func(npc.setHpr, hpr)

View file

@ -968,8 +968,8 @@ class Toon(Avatar.Avatar, ToonHead):
return swappedTorso
def generateLaughingMan(self):
if not self.getHasLaughingMan() and self.getWantLaughingMan():
def generateLaughingMan(self, force=False):
if force or (not self.getHasLaughingMan() and self.getWantLaughingMan()):
LaughingManGlobals.addToonEffect(self)
def generateHat(self, fromRTM = False):