From daea50b1df19aea257018e4725463f33ce09b937 Mon Sep 17 00:00:00 2001 From: haller Date: Mon, 2 May 2005 19:04:32 +0000 Subject: Modification de send: passage d'un max de 4 arguments à 6 arguments. --- 2005/i/robert/src/proto/proto.cc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to '2005/i/robert/src/proto/proto.cc') diff --git a/2005/i/robert/src/proto/proto.cc b/2005/i/robert/src/proto/proto.cc index d1ba655..2b8996a 100644 --- a/2005/i/robert/src/proto/proto.cc +++ b/2005/i/robert/src/proto/proto.cc @@ -105,7 +105,7 @@ Proto::send (const Frame & frame, bool reliable) /// 32 bits, majuscule pour signé). void Proto::send (char command, const char *format, int a0, int a1, - int a2, int a3, bool reliable) + int a2, int a3, int a4, int a5, bool reliable) { // Constitution de la frame Proto::Frame frame; @@ -121,19 +121,28 @@ Proto::send (char command, const char *format, int a0, int a1, { newArgFrame(frame, format[2],a2); if (format[3] != '\0') + { newArgFrame(frame, format[3],a3); + if(format[4] != '\0') + { + newArgFrame(frame, format[4],a4); + if(format[5] != '\0') + newArgFrame(frame, format[5],a5); + } + + } } - } } +} send(frame,reliable); } /// permet d'envoyer un packet pas fiable void Proto::sendUnreliable (char command, const char *format, int a0, int a1, - int a2, int a3) + int a2, int a3, int a4, int a5) { - send(command, format, a0, a1, a2, a3, false); + send(command, format, a0, a1, a2, a3, a4, a5, false); } /// Teste si le packet correspond au format et décode les valeurs. Utilise -- cgit v1.2.3