Merge branch 'master' into redo-noms

This commit is contained in:
David Anderson
2014-07-06 23:49:18 -07:00
15 changed files with 713 additions and 396 deletions
+1 -1
View File
@@ -301,7 +301,7 @@ methodmap ArrayList < Handle {
public SwapAt() = SwapArrayItems;
public FindString() = FindStringInArray;
public FindValue() = FindValueInArray;
property int Size {
property int Length {
public get() = GetArraySize;
}
};
+1 -1
View File
@@ -78,7 +78,7 @@ native Handle:CloneHandle(Handle:hndl, Handle:plugin=INVALID_HANDLE);
/**
* Helper for object-oriented syntax.
*/
methodmap Handle
methodmap Handle __nullable__
{
public Clone() = CloneHandle;
public ~Handle() = CloseHandle;
+1 -1
View File
@@ -98,7 +98,7 @@ native bool:EndOfMapVoteEnabled();
* Called when mapchooser removes a nomination from its list.
* Nominations cleared on map start will not trigger this forward
*/
forward void OnNominationRemoved(char[] map, int owner);
forward void OnNominationRemoved(const char[] map, int owner);
/**
* Called when mapchooser starts a Map Vote.
+14 -16
View File
@@ -453,7 +453,7 @@ native GetMenuOptionFlags(Handle:menu);
* @noreturn
* @error Invalid Handle.
*/
native SetMenuOptionFlags(Handle:menu, flags);
native void SetMenuOptionFlags(Handle:menu, flags);
/**
* Returns whether a vote is in progress.
@@ -562,24 +562,29 @@ methodmap Menu < Handle {
public DisplayVote() = VoteMenu;
public DisplayVoteToAll() = VoteMenuToAll;
public SetPagination() = SetMenuPagination;
property int Pagination {
public get() = GetMenuPagination;
public set(int value) {
SetMenuPagination(this, value);
}
}
public SetOptionFlags() = SetMenuOptionFlags;
property int OptionFlags {
public get() = GetMenuOptionFlags;
public set() = SetMenuOptionFlags;
}
public SetExitButton() = SetMenuExitButton;
property bool ExitButton {
public get() = GetMenuExitButton;
public set(bool value) {
SetMenuExitButton(this, value);
}
}
public SetExitBackButton() = SetMenuExitBackButton;
property bool ExitBackButton {
public get() = GetMenuExitBackButton;
public set(bool value) {
SetMenuExitBackButton(this, value);
}
}
public SetNoVoteButton() = SetMenuNoVoteButton;
public SetVoteResultCallback() = SetVoteResultCallback;
@@ -589,18 +594,11 @@ methodmap Menu < Handle {
property Handle Style {
public get() = GetMenuStyle;
}
property bool VoteInProgress {
property int SelectionPosition {
public get() {
return IsVoteInProgress(this);
return GetMenuSelectionPosition();
}
}
public void CancelVote() {
CancelVote();
}
public int GetSelectionPosition() {
return GetMenuSelectionPosition();
}
};
/**
+2 -2
View File
@@ -254,12 +254,12 @@ native TF2_SetPlayerPowerPlay(client, bool:enabled);
*
* @param client Player's index.
* @param team Team to disguise the player as (only TFTeam_Red and TFTeam_Blue have an effect)
* @param class TFClassType class to disguise the player as
* @param classType TFClassType class to disguise the player as
* @param target Specific target player to disguise as (0 for any)
* @noreturn
* @error Invalid client index, client not in game, or no mod support.
*/
native TF2_DisguisePlayer(client, TFTeam:team, TFClassType:class, target=0);
native TF2_DisguisePlayer(client, TFTeam:team, TFClassType:classType, target=0);
/**
* Removes the current disguise from a client. Only has an effect on spies.
+4 -4
View File
@@ -335,19 +335,19 @@ stock TFClassType:TF2_GetPlayerClass(client)
* Note: If setting player class in a player spawn hook weapons should be set to false.
*
* @param client Player's index.
* @param class TFClassType class symbol.
* @param classType TFClassType class symbol.
* @param weapons This paramater is ignored.
* @param persistent If true changes the players desired class so the change stays after death.
* @noreturn
* @error Invalid client index.
*/
stock TF2_SetPlayerClass(client, TFClassType:class, bool:weapons=true, bool:persistent=true)
stock TF2_SetPlayerClass(client, TFClassType:classType, bool:weapons=true, bool:persistent=true)
{
SetEntProp(client, Prop_Send, "m_iClass", _:class);
SetEntProp(client, Prop_Send, "m_iClass", _:classType);
if (persistent)
{
SetEntProp(client, Prop_Send, "m_iDesiredPlayerClass", _:class);
SetEntProp(client, Prop_Send, "m_iDesiredPlayerClass", _:classType);
}
}