Eliminate extraneous view_as calls and also update mapchooser.inc.

This commit is contained in:
Ross Bemrose
2014-12-16 13:53:54 -05:00
parent 46839b9752
commit bc4d6b7104
2 changed files with 20 additions and 16 deletions
+9 -10
View File
@@ -27,7 +27,7 @@ enum MapChange
* @param owner Client index of the nominater. If the client disconnects the nomination will be removed. Use 0 for constant nominations
* @return Nominate Result of the outcome
*/
native NominateResult:NominateMap(const String:map[], bool:force, owner);
native NominateResult NominateMap(const char[] map, bool force, int owner);
/**
* Attempt to remove a map from the mapchooser map list.
@@ -35,7 +35,7 @@ native NominateResult:NominateMap(const String:map[], bool:force, owner);
* @param map Map to remove.
* @return True if the nomination was found and removed, or false if the nomination was not found.
*/
native bool:RemoveNominationByMap(const String:map[]);
native bool RemoveNominationByMap(const char[] map);
/**
* Attempt to remove a map from the mapchooser map list.
@@ -43,7 +43,7 @@ native bool:RemoveNominationByMap(const String:map[]);
* @param owner Client index of the nominater.
* @return True if the nomination was found and removed, or false if the nomination was not found.
*/
native bool:RemoveNominationByOwner(owner);
native bool RemoveNominationByOwner(int owner);
/**
* Gets the current list of excluded maps.
@@ -51,7 +51,7 @@ native bool:RemoveNominationByOwner(owner);
* @param array An ADT array handle to add the map strings to.
* @noreturn
*/
native GetExcludeMapList(Handle:array);
native GetExcludeMapList(ArrayList array);
/**
* Gets the current list of nominated maps.
@@ -60,14 +60,14 @@ native GetExcludeMapList(Handle:array);
* @param ownerarray An optional ADT array handle to add the nominator client indexes to.
* @noreturn
*/
native GetNominatedMapList(Handle:maparray, Handle:ownerarray = INVALID_HANDLE);
native GetNominatedMapList(ArrayList maparray, ArrayList ownerarray = null);
/**
* Checks if MapChooser will allow a vote
*
* @return True if a vote can be held, or false if mapchooser is already holding a vote.
*/
native bool:CanMapChooserStartVote();
native bool CanMapChooserStartVote();
/**
* Initiates a MapChooser map vote
@@ -78,21 +78,21 @@ native bool:CanMapChooserStartVote();
* @param when MapChange consant of when the resulting mapchange should occur.
* @param inputarray ADT array list of maps to add to the vote.
*/
native InitiateMapChooserVote(MapChange:when, Handle:inputarray=INVALID_HANDLE);
native InitiateMapChooserVote(MapChange when, ArrayList inputarray=null);
/**
* Checks if MapChooser's end of map vote has completed.
*
* @return True if complete, false otherwise.
*/
native bool:HasEndOfMapVoteFinished();
native bool HasEndOfMapVoteFinished();
/**
* Checks if MapChooser is set to run an end of map vote.
*
* @return True if enabled, false otherwise.
*/
native bool:EndOfMapVoteEnabled();
native bool EndOfMapVoteEnabled();
/**
* Called when mapchooser removes a nomination from its list.
@@ -105,7 +105,6 @@ forward void OnNominationRemoved(const char[] map, int owner);
*/
forward void OnMapVoteStarted();
public SharedPlugin:__pl_mapchooser =
{
name = "mapchooser",