About Store Forum Documentation Contact
Donations:
309$/mo



Post Reply 
chr speed
Author Message
khces Offline
Member

Post: #1
chr speed
^^hi
Why is the speed of character 4.1? What's the measurement?

and

Pak update how use .....

void PakUpdate(Pak &src_pak, Memb<PakFileData> &update_files, Str pak_name, Secure *dest_secure=NULL); ?

how update Pak directly?

thanks
(This post was last modified: 08-10-2010 08:19 AM by khces.)
08-10-2010 08:11 AM
Find all posts by this user Quote this message in a reply
Chris Offline
Member

Post: #2
RE: chr speed
Hi smile

For chr speed, you can check out:

http://www.esenthel.com/community/showth...ight=speed

Not used Pak update, have to wait for someone else to reply.
08-10-2010 10:28 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #3
RE: chr speed
Hi, speed is meters/second, however there are many other factors which can affect the speed, like Physics.gravity, ground/controller friction, actor material properties

for updating the pak ill make a tutorial about it, for the next SDK
08-10-2010 12:16 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: chr speed
This will be included in the next SDK:

(however please avoid updating big file paks (>200MB) during patching the game when it's already released, it is suggested to have "original_data.pak", and also other "patch_1.pak", "patch_2.pak", etc.. and load all paks in the Init function using multiple calls to Paks.add())

Code:
/******************************************************************************/
#include "stdafx.h"
/******************************************************************************/
Str data1,data2,data3;
/******************************************************************************/
void InitPre()
{
   App.name("Pak Update");
   App.flag=APP_NO_FX;
   Paks.add("../data/engine.pak");
}
/******************************************************************************/
Bool Init()
{
   Text_ds.color =BLACK;
   Text_ds.shadow=0;

   // first create a Pak from files in memory
   {
      Memb<PakFileData> files; // set of file's which we'll create and write to them

      // add "file1.dat"
      {
         PakFileData &pfd=files.New();
         pfd.name="file1.dat";          // set the file location inside the pak
         pfd.file.writeMem();           // open file data for writing
         pfd.file.putStr("Old Data 1"); // write some text to the file
         pfd.modify_time_utc.getUTC();  // set file modification time
      }
      
      // add "file2.dat"
      {
         PakFileData &pfd=files.New();
         pfd.name="file2.dat";          // set the file location inside the pak
         pfd.file.writeMem();           // open file data for writing
         pfd.file.putStr("Old Data 2"); // write some text to the file
         pfd.modify_time_utc.getUTC();  // set file modification time
      }

      // add "Folder/file3.dat"
      {
         PakFileData &pfd=files.New();
         pfd.name="Folder/file3.dat";   // set the file location inside the pak
         pfd.file.writeMem();           // open file data for writing
         pfd.file.putStr("Old Data 3"); // write some text to the file
         pfd.modify_time_utc.getUTC();  // set file modification time
      }
      
      PakCreate(files,"Pak from memory.pak"); // create the pak
   }
  
   // Update the Pak
   {
      Memb<PakFileData> files;
      
      // remove "file2.dat"
      {
         PakFileData &pfd=files.New();
         pfd.name="file2.dat"; // set the file location inside the pak
         pfd.exists=false;     // specify that the file shouldn't exist
      }
      
      // update "Folder/file3.dat"
      {
         PakFileData &pfd=files.New();
         pfd.name="Folder/file3.dat";   // set the file location inside the pak
         pfd.file.writeMem();           // open file data for writing
         pfd.file.putStr("New Data 3"); // write some text to the file
         pfd.modify_time_utc.getUTC();  // set file modification time
      }
      
      Pak pak;  pak.load( "Pak from memory.pak"); // load the source pak
      PakUpdate(pak,files,"Pak from memory.pak"); // update the pak
   }

   // load data from Pak
   {
      Paks.add("Pak from memory.pak");

      File f;
      if(f.readTry(       "file1.dat"))f.getStr(data1);
      if(f.readTry(       "file2.dat"))f.getStr(data2);
      if(f.readTry("Folder/file3.dat"))f.getStr(data3);
   }
   return true;
}
/******************************************************************************/
void Shut()
{
}
/******************************************************************************/
Bool Update()
{
   if(Kb.bp(KB_ESC))return false;
   return true;
}
/******************************************************************************/
void Draw()
{
   D.clear(WHITE);
   D.text (0, 0.1f,data1);
   D.text (0, 0.0f,data2);
   D.text (0,-0.1f,data3);
}
/******************************************************************************/
08-10-2010 01:21 PM
Find all posts by this user Quote this message in a reply
Qbound Offline
Member

Post: #5
RE: chr speed
Great news for the pak file... you make me happy smile
08-10-2010 04:39 PM
Find all posts by this user Quote this message in a reply
Post Reply