home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 1.5)
-
- import Bladex
- import math
- import SolidMask
- import Blood
- import Reference
- import Actions
- import Breakings
- MESSAGE_START_WEAPON = 7
- MESSAGE_STOP_WEAPON = 8
-
- def levanteseHombre():
- char = Bladex.GetEntity('Player1')
- char.LaunchAnmType('Rlx')
- Bladex.GetEntity('Camera').SetPersonView('Player1')
- cam = Bladex.GetEntity('Camera')
- cam.SetPersonView('Player1')
- cam.Cut()
-
-
- def StoneStopFuncHitEvent(ent):
- ent = Bladex.GetEntity(ent)
- ent.ExclusionMask = ent.ExclusionMask & ~(SolidMask.EX_PERSON)
-
-
- def StoneHitEvent(EntityName, VictimName, ImpX, ImpY, ImpZ):
- ent = Bladex.GetEntity(VictimName)
- if ent.Person:
- dir = (ImpX, ImpY, ImpZ)
- size = math.sqrt(ImpX * ImpX + ImpY * ImpY + ImpZ * ImpZ)
- if size > 0.1:
- dirn = (dir[0] / size, dir[1] / size, dir[2] / size)
- ang = math.asin(dirn[0])
- if dirn[2] < 0.0:
- ang = ang + 3.1415
-
- char = Bladex.GetEntity('Player1')
- difang = ang - char.Angle
- difang = abs(difang - int(difang / 6.28) * 6.28)
- ent.Life = -1
- if difang < 3.14 * 0.5 or difang > 3.14 * 1.5:
- ent.SetTmpAnmFlags(1, 1, 1, 0, 5, 1, 0)
- ent.Wuea = Reference.WUEA_ENDED
- ent.LaunchAnmType('dth_rock')
- else:
- ent.SetTmpAnmFlags(1, 1, 1, 0, 5, 1, 0)
- ent.Wuea = Reference.WUEA_ENDED
- ent.LaunchAnmType('dth_rockfront')
- if VictimName != 'Player1':
- oname = ent.InvLeft
- Actions.RemoveFromInventory(ent, Bladex.GetEntity(ent.InvLeft), 0)
- Breakings.ExplodeSpecialObject(oname, 10000)
- oname = ent.InvRight
- Actions.RemoveFromInventory(ent, Bladex.GetEntity(ent.InvRight), 0)
- Breakings.ExplodeSpecialObject(oname, 10000)
-
- charPos = ent.Position
- Blood.BleedingImpact(ent, charPos[0], charPos[1], charPos[2], 9999, 0, 0, None, 0, 0, 0, 0, 0, 0)
- Blood.BleedingImpact(ent, charPos[0], charPos[1], charPos[2], 9999, 0, 9999, None, 0, 0, 0, 0, 0, 0)
- Blood.BleedingImpact(ent, charPos[0], charPos[1], charPos[2], 3333, 0, 0, None, 0, 0, 0, 0, 0, 0)
- Blood.BleedingImpact(ent, charPos[0], charPos[1], charPos[2], 9999, 0, 3333, None, 0, 0, 0, 0, 0, 0)
- Blood.BleedingImpact(ent, charPos[0], charPos[1], charPos[2], 0, 0, 3333, None, 0, 0, 0, 0, 0, 0)
- Blood.BleedingImpact(ent, charPos[0], charPos[1], charPos[2], 0, 0, 9999, None, 0, 0, 0, 0, 0, 0)
- Blood.BleedingImpact(ent, charPos[0], charPos[1], charPos[2], 0, 0, 0, None, 0, 0, 0, 0, 0, 0)
- pedrolo = Bladex.GetEntity(EntityName)
- x = -(pedrolo.Mass) * 1e-006 * ImpX
- y = -3500.0 * pedrolo.Mass
- z = -(pedrolo.Mass) * 1e-006 * ImpZ
- pedrolo.Impulse(x, y, z)
- Bladex.AddScheduledFunc(Bladex.GetTime() + 0.0, RestoreInflictHitFunc, (pedrolo,))
-
-
-
-
- def RestoreInflictHitFunc(o):
- o.ExclusionMask = o.ExclusionMask | SolidMask.EX_PERSON
- o.MessageEvent(MESSAGE_START_WEAPON, 0, 0)
- o.InflictHitFunc = StoneHitEvent
-
-
- def CreateHeavyObject(name, objtype, positionVec, orientationQuat, fScale, hitfunc):
- o = Bladex.CreateEntity(name, objtype, positionVec[0], positionVec[1], positionVec[2])
- o.Scale = fScale
- o.Orientation = orientationQuat
- o.Weapon = 1
- o.ExclusionMask = o.ExclusionMask | SolidMask.EX_PERSON
- o.MessageEvent(MESSAGE_START_WEAPON, 0, 0)
- o.InflictHitFunc = hitfunc
- o.OnStopFunc = StoneStopFuncHitEvent
- return o
-
-