//-----------------------------------------------------------------------------
//
//  $Logfile:: /Source/cl_inv.c                                               $
// $Revision:: 3                                                              $
//   $Author:: Burgermac                                                      $
//     $Date:: 8/8/01 4:48 PM                                                 $
//
// Copyright (C) 1998 by Ritual Entertainment, Inc.
// All rights reserved.
//
// This source is may not be distributed and/or modified without
// expressly written permission by Ritual Entertainment, Inc.
//
// DESCRIPTION:
// client inventory screen
//

#include "client.h"

/*
================
CL_ParseInventory
================
*/
void CL_ParseInventory (void)
{
	int num_items;
	int i;

	num_items = MSG_ReadShort(&net_message);

	if (num_items == 0)
		memset(cl.inventory, 0, sizeof(cl.inventory));

	for (i = 0; i < MAX_ITEMS; i++)
	{
		if (i < num_items)
		{
			cl.inventory[i].icon   = MSG_ReadShort (&net_message);
			cl.inventory[i].amount = MSG_ReadShort (&net_message);
		}
		else
		{
			cl.inventory[i].icon   = 0;
			cl.inventory[i].amount = 0;
		}
	}
}
