Ejemplo n.º 1
0
void
delete_player(dbref who)
{
    int result;

    result = free_hash(NAME(who), player_list, PLAYER_HASH_SIZE);

    /* Nuke the alias managed by this dbref. This will not remove any aliases
     * that were manually set on #0, but they should auto-clean as the lookups
     * are attempted. */
    rotate_alias(who, 1);

    if (result) {
        int i;

        wall_wizards(MARK
                     "WARNING: Playername hashtable is inconsistent.  Rebuilding it.");
        clear_players();
        for (i = db_top; i-- > 0;) {
            if (Typeof(i) == TYPE_PLAYER) {
                add_player(i);
            }
        }
        result = free_hash(NAME(who), player_list, PLAYER_HASH_SIZE);
        if (result) {
            wall_wizards(MARK
                         "WARNING: Playername hashtable still inconsistent after rebuild.");
        }
    }

    return;
}
Ejemplo n.º 2
0
void 
delete_player(dbref who)
{
    int result;

    result = free_hash(NAME(who), player_list, PLAYER_HASH_SIZE);

    if (result) {
	int i;

        wall_wizards("## WARNING: Playername hashtable is inconsistent.  Rebuilding it.");
        clear_players();
        for (i = db_top; i-->0; ) {
            if (Typeof(i) == TYPE_PLAYER) {
                add_player(i);
            }
        }
	result = free_hash(NAME(who), player_list, PLAYER_HASH_SIZE);
	if (result) {
	    wall_wizards("## WARNING: Playername hashtable still inconsistent after rebuild.");
	}
    }

    return;
}
Ejemplo n.º 3
0
void
refresh_players(void)
{
    int i;

    clear_players();
    for (i = db_top; i-->0; ) {
        if (Typeof(i) == TYPE_PLAYER) {
            add_player(i);
        }
    }
}
Ejemplo n.º 4
0
void Graphics::clear_all() {
	SDL_FreeSurface(weapons);
	SDL_FreeSurface(bombs);
	SDL_FreeSurface(powerups);

	SDL_FreeSurface(shield);

	SDL_FreeSurface(player1hp);
	SDL_FreeSurface(player2hp);

	SDL_FreeSurface(common);

	SDL_FreeSurface(pmarker);

	SDL_FreeSurface(bg_grey);
	SDL_FreeSurface(bg_menu);
	
	SDL_FreeSurface(cups);

	SDL_FreeSurface(tiles);

	SDL_FreeSurface(npc_chick);
	SDL_FreeSurface(npc_cannon);
	SDL_FreeSurface(npc_gatling);

	SDL_FreeSurface(statsblock[0]);
	SDL_FreeSurface(statsblock[1]);
	SDL_FreeSurface(statsblock[2]);

	SDL_FreeSurface(text_ready);
	SDL_FreeSurface(text_random);

	SDL_FreeSurface(text_pressstart);

	clear_players();
	clear_player_clips();
}