diff --git a/Mod/RespawnEqument/init.c b/Mod/RespawnEqument/init.c index 3e8e003..a0e712e 100644 --- a/Mod/RespawnEqument/init.c +++ b/Mod/RespawnEqument/init.c @@ -61,10 +61,13 @@ class CustomMission: MissionServer string steamid = player.GetIdentity().GetPlainId(); ref PlayerRevivalEquipmentData rev = g_CustomRevivalSuitCfg.GetPlayerRevivalEquipmentData( steamid ); + bool isVIP = false; if ( rev ) + { + isVIP = true; ProcessVIPEquipment( player, rev ); - - DefaultPlayerEquipment( player, clothesChosen ); + } + DefaultPlayerEquipment( player, clothesChosen, isVIP ); } void ProcessVIPEquipment( PlayerBase player, ref PlayerRevivalEquipmentData equ_data ) @@ -109,13 +112,20 @@ class CustomMission: MissionServer } } - void DefaultPlayerEquipment( PlayerBase player, bool clothesChosen ) + void DefaultPlayerEquipment( PlayerBase player, bool clothesChosen, bool isVIP ) { EntityAI itemClothing; EntityAI itemEnt; ItemBase itemBs; float rand; + if ( !isVIP ) + { + // TODO: 这里给普通玩家创建装备. 以前在StartingEquipSetup中如何给玩家创建新的装备这里就如何写 + // player.RemoveAllItems(); // 移除所有默认装备 + // itemEnt = player.GetInventory().CreateInInventory( "" /*这里写服装代码 */ ); + } + itemClothing = player.FindAttachmentBySlotName( "Body" ); if ( itemClothing ) {