void Cmd_HolyFreeze(edict_t *ent) { qboolean sameaura=false; if (debuginfo->value) gi.dprintf("DEBUG: %s just called Cmd_HolyFreeze()\n", ent->client->pers.netname); if(ent->myskills.abilities[HOLY_FREEZE].disable) return; if (!G_CanUseAbilities(ent, ent->myskills.abilities[HOLY_FREEZE].current_level, 0)) return; // if we already had an aura on, remove it if (que_typeexists(ent->auras, AURA_HOLYFREEZE)) { safe_cprintf(ent, PRINT_HIGH, "Holy freeze removed.\n"); AuraRemove(ent, AURA_HOLYFREEZE); return; } ent->client->ability_delay = level.time + DEFAULT_AURA_DELAY; // do we have enough power cubes? if (ent->client->pers.inventory[power_cube_index] < DEFAULT_AURA_INIT_COST) { safe_cprintf(ent, PRINT_HIGH, "You need more %d power cubes to use this ability.\n", DEFAULT_AURA_INIT_COST-ent->client->pers.inventory[power_cube_index]); return; } ent->client->pers.inventory[power_cube_index] -= DEFAULT_AURA_INIT_COST; gi.sound(ent, CHAN_ITEM, gi.soundindex("auras/holywind.wav"), 1, ATTN_NORM, 0); safe_cprintf(ent, PRINT_HIGH, "Now using holy freeze aura.\n"); aura_holyfreeze(ent); }
void Cmd_Salvation(edict_t *ent) { que_t *slot=NULL; qboolean sameaura=false; if (debuginfo->value) gi.dprintf("DEBUG: %s just called Cmd_Salvation()\n", ent->client->pers.netname); if(ent->myskills.abilities[SALVATION].disable) return; if (!G_CanUseAbilities(ent, ent->myskills.abilities[SALVATION].current_level, 0)) return; // if we already had an aura on, remove it if ((slot = que_findtype(ent->auras, slot, AURA_SALVATION)) != NULL) { // owner is turning off his own aura if (slot->ent && slot->ent->owner && slot->ent->owner->inuse && slot->ent->owner == ent) { AuraRemove(ent, AURA_SALVATION); safe_cprintf(ent, PRINT_HIGH, "Salvation removed.\n"); return; } AuraRemove(ent, AURA_SALVATION); } ent->client->ability_delay = level.time + DEFAULT_AURA_DELAY; // do we have enough power cubes? if (ent->client->pers.inventory[power_cube_index] < DEFAULT_AURA_INIT_COST) { safe_cprintf(ent, PRINT_HIGH, "You need more %d power cubes to use this ability.\n", DEFAULT_AURA_INIT_COST-ent->client->pers.inventory[power_cube_index]); return; } ent->client->pers.inventory[power_cube_index] -= DEFAULT_AURA_INIT_COST; gi.sound(ent, CHAN_ITEM, gi.soundindex("auras/salvation.wav"), 1, ATTN_NORM, 0); safe_cprintf(ent, PRINT_HIGH, "Now using salvation aura.\n"); aura_salvation(ent); }
void MoveClientToIntermission (edict_t *ent) { ent->client->showscores = true; // VectorCopy (level.intermission_origin, ent->s.origin); ent->client->ps.pmove.origin[0] = level.intermission_origin[0]*8; ent->client->ps.pmove.origin[1] = level.intermission_origin[1]*8; ent->client->ps.pmove.origin[2] = level.intermission_origin[2]*8; VectorCopy (level.intermission_angle, ent->client->ps.viewangles); ent->client->ps.pmove.pm_type = PM_FREEZE; ent->client->ps.gunindex = 0; ent->client->ps.blend[3] = 0; VectorCopy (level.intermission_origin, ent->s.origin); // clean up powerup info ent->client->quad_framenum = 0; ent->client->invincible_framenum = 0; ent->client->breather_framenum = 0; ent->client->enviro_framenum = 0; ent->client->grenade_blew_up = false; ent->client->grenade_time = 0; // RemoveAllAuras(ent); // RemoveAllCurses(ent); AuraRemove(ent, 0); CurseRemove(ent, 0); // RAFAEL ent->client->quadfire_framenum = 0; // RAFAEL //ent->client->trap_blew_up = false; //ent->client->trap_time = 0; ent->viewheight = 0; ent->s.modelindex = 0; ent->s.modelindex2 = 0; ent->s.modelindex3 = 0; ent->s.modelindex = 0; ent->s.effects = 0; ent->s.sound = 0; ent->solid = SOLID_NOT; // add the layout if (deathmatch->value && !(ent->svflags & SVF_MONSTER)) { DeathmatchScoreboardMessage (ent, NULL); gi.unicast (ent, true); } }
void V_DisableAllSkills(edict_t *ent) { //jetpack ent->client->thrusting = 0; //grapple hook ent->client->hook_state = HOOK_READY; //power screen if (ent->flags & FL_POWER_ARMOR) { ent->flags &= ~FL_POWER_ARMOR; gi.sound(ent, CHAN_AUTO, gi.soundindex("misc/power2.wav"), 1, ATTN_NORM, 0); } //superspeed ent->superspeed = false; //Disable all auras AuraRemove(ent, 0); }