def release(self): throwPath = NodePath('ThrowPath') throwPath.reparentTo(self.avatar) throwPath.setScale(render, 1) throwPath.setPos(0, 160, -120) throwPath.setHpr(0, 90, 0) if not self.gag: self.build() self.entity = self.gag self.gag = None self.entity.wrtReparentTo(render) self.entity.setHpr(throwPath.getHpr(render)) self.setHandJoint() self.track = ProjectileInterval(self.entity, startPos=self.handJoint.getPos(render), endPos=throwPath.getPos(render), gravityMult=0.9, duration=3) self.track.start() if self.isLocal(): self.startTimeout() self.buildCollisions() self.avatar.acceptOnce('gagSensor-into', self.onCollision) self.reset() TrapGag.release(self)
def release(self): TrapGag.release(self) if self.trapMode == 0: LocationGag.release(self) self.build() self.buildCollisions() actorTrack = LocationGag.getActorTrack(self) if actorTrack: LocationGag.getSoundTrack(self).start() if self.isLocal(): actorTrack.append(Func(self.avatar.b_gagThrow, self.getID())) actorTrack.start() elif self.trapMode == 1: self.startEntity()
def release(self): TrapGag.release(self) if self.trapMode == 0: LocationGag.release(self) self.build() self.buildCollisions() actorTrack = LocationGag.getActorTrack(self) if actorTrack: LocationGag.getSoundTrack(self).start() if self.isLocal(): actorTrack.append(Func(self.avatar.b_gagThrow, self.getID())) actorTrack.start() else: if self.trapMode == 1: self.startEntity()
def release(self): TrapGag.release(self) # Let's release the location seeker if we're using a trapdoor or quicksand. if self.trapMode == 0: LocationGag.release(self) self.build() self.buildCollisions() actorTrack = LocationGag.getActorTrack(self) if actorTrack: LocationGag.getSoundTrack(self).start() if self.isLocal(): actorTrack.append( Func(self.avatar.b_gagThrow, self.getID())) actorTrack.start() elif self.trapMode == 1: self.startEntity()
def release(self): TrapGag.release(self) throwPath = NodePath('ThrowPath') throwPath.reparentTo(self.avatar) throwPath.setScale(render, 1) throwPath.setPos(0, 160, -120) throwPath.setHpr(0, 90, 0) if not self.gag: self.build() self.gag.wrtReparentTo(render) self.gag.setHpr(throwPath.getHpr(render)) self.setHandJoint() self.track = ProjectileInterval(self.gag, startPos=self.handJoint.getPos(render), endPos=throwPath.getPos(render), gravityMult=0.9, duration=3) self.track.start() if base.localAvatar == self.avatar: self.buildCollisions() self.avatar.acceptOnce('gagSensor-into', self.onCollision) self.reset()